I am running program using runit to run at startup. I want all the output by from the program that is run by runit to be logged to a file.I have looked at svlogd but I cannot figure out how to get it running.
How to log output to log file using runit
init;runit
I cannot figure out how to get it running.In the daemontools family world, log services are just services like any other.  So you run svlogd with a run program just like you would run a main service with a run program.The special things about log services are merely that:The log service directory is located using a symbolic link from (or a straight subdirectory beneath) the main service directory.Some, but not all, daemontools family toolsets tightly bind log and main services and operate upon the twain as a unit.  This is to a degree the case with runit.Otherwise, they are just like everything else.So make a log service to run svlogd just like you would make any other service, put it into the right place relative to your main service, and set things off.Further readingJonathan de Boyne Pollard (2015). Logging.  The daemontools family.  Frequently Given Answers.Gerrit Pape. How do I create a new service directory with an appendant log service?.  runit Frequently Asked Questions.Daniel J. Bernstein.  How do I create a service directory with a log?.  daemontools Frequently Asked Questions.