Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Log facilities




Le 19 oct. 04, à 15:31, stephane sudre a écrit :

Is there any global API to log information into a .log file.

Logging information in system.log is easy. But from what I'm seeing in netinfo-324.6 for instance, there seems to be no global API to create .log files. Am I missing something?


You should use the syslog API.

In a nutshell, you ask the system to log a message for a given priority (alert, warning, debug…) and type (auth, kernel, ftp, daemon…). According to the syslog configuration (/etc/syslog.conf), the messages are redirected to .log files in /var/log/.

See "man syslog", "man syslogd" and "man syslog.conf" for more details.

--
Damien Bobillot

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.