2 * Copyright 2007 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
7 * Niels Sascha Reedijk, niels.reedijk@gmail.com
10 * headers/posix/syslog.h rev 6684
17 \brief System logging capabilities
19 The functions described here are interacting with the syslog_daemon, a server
20 that provides the system logging capabilities.
21 The log can be found in /var/log/syslog.
26 \fn void closelog(void)
27 \brief Closes the current log session
32 \fn void openlog(const char *ident, int options, int facility)
33 \brief Starts a log session, and sets some output options
35 Like openlog_thread() this function defines the log session in thread context; the
36 global options set by openlog_team() are not affected by this function.
41 \fn int setlogmask(int priorityMask)
42 \brief sets the logging priority mask
47 \fn void syslog(int priority, const char *message, ...)
48 \brief sends a message to the system log
53 \fn void closelog_team(void)
59 \fn void openlog_team(const char *ident, int logopt, int facility)
60 \brief Starts a log session, and sets some output options
62 This function defines the team-wide logging options. Thread local sessions
63 started with openlog() or openlog_thread() will inherit the options of the
69 \fn void log_team(int priority, const char *message, ...)
70 \brief sends a message to the system log
75 \fn int setlogmask_team(int priorityMask)
76 \brief sets the logging priority mask
81 \fn void closelog_thread(void)
87 \fn void openlog_thread(const char *ident, int logopt, int facility)
88 \brief Starts a log session, and sets some output options
93 \fn void log_thread(int priority, const char *message, ...)
94 \brief sends a message to the system log
99 \fn int setlogmask_thread(int priorityMask)
100 \brief sets the logging priority mask
105 \name Options for openlog()
114 \brief Log the process (thread/team) ID with each message
120 \brief Log to the system console on error
126 \brief Delay open until syslog() is called
132 \brief Connect to the syslog daemon immediately
138 \brief Dump to serial output as well.
139 \attention This is not yet implemented
145 \brief Dump to stderr as well
151 \brief Do not wait for child processes
158 /*! \name Facilities for openlog()
167 \brief Reserved for messages generated by the kernel.
173 \brief Reserved for messages generated by user processes.
179 \brief Standard (?) POSIX facility for messages by the mailing daemon.
185 \brief Standard POSIX (?) facility for messages by daemons (and Haiku servers).
191 \brief Standard POSIX facility(?) for messages by the authentication services.
197 \brief Reserved for messages generated by the syslog daemon.
203 \brief Reserved for messages generated by the UNIX lpr printing tool.
209 \brief Reserved for messages generated by something UNIXy that does something with NEWS.
215 \brief Reserved for messages generated by UUCP
221 \brief Reserved for messages generated by the CRON daemon.
227 \brief Reserved for private (?) messages that relate to authentication.
233 \brief For local use.
239 \brief For local use.
245 \brief For local use.
251 \brief For local use.
257 \brief For local use.
263 \brief For local use.
269 \brief For local use.
275 \brief For local use.
283 \name Priorities for syslog(), log_team() and log_thread()
292 \brief A panic condition
298 \brief An alias for LOG_EMERG
304 \brief A condition to that should be corrected immediately
310 \brief Critical conditions like hard drive errors
328 \brief Notices, instructions on how to use certain configuration options.
334 \brief Information, like versions and so.
340 \brief Debug information.
349 \brief Converts a priority definition for use in setlogmask()