Logging

In our development careers at one time or another we have all done caveman debugging, putting in lots of print statements to see program flow and to see what values our variables have. Using stuff in Chapter 11: Files, Part 1: I/O and Permissions, you can even redirect those print statements to log files.

But there are times when you are logging and it is not debugging related, like server programs keeping an audit trail of connections or printing information that may be of interest to administrators (such as the disk is filling up). Most Unix systems have a daemon running called syslogd, the system logging daemon. System administrators can configure syslogd to log to a file or to send the log information from many machines to a central ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.