Logs and rotation

Craig Treleaven ctreleaven at cogeco.ca
Sat May 12 13:39:58 PDT 2012


Hi:

I've searched a few times in the past with but haven't found a good 
guide to logging on OS X.  The port I'm working on, MythTV, consists 
of a number of programs that all produce logs.  Some of the logs can 
grow to be very large (10's of megs) so some mechanism of rotation 
would be a good thing. The major options seem to be to log to a 
folder or use Syslog.

I see there are man pages for 'syslog' and 'newsyslog' on OS X.  Is 
there a cookbook somewhere on using these things?  Or is there a 
better tool?  Obviously, OS X rotates the logs in /Private/var/log on 
a regular basis.  How/where is this controlled and can I set up a new 
directory under that path and rotate those logs?

Even better would be an example of a port that sets up/deals with 
extensive logs!

Background on Myth's logging can be found at 
http://www.mythtv.org/wiki/Logging.

Thanks,

Craig



More information about the macports-dev mailing list