haiku/docs/user/support/syslog.dox

293 lines
4.9 KiB
Plaintext
Raw Normal View History

/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Documentation written by:
* Axel D<>rfler
* Niels Sascha Reedijk <niels.reedijk@gmail.com>
* Corresponds to:
* /trunk/headers/posix/syslog.h rev 6684
*/
/*!
\file syslog.h
\ingroup support
\ingroup libroot
\brief System logging capabilities
The functions described here are interacting with the syslog_daemon, a server
that provides the system logging capabilities.
The log can be found in /var/log/syslog.
*/
/*!
\fn void closelog(void)
\brief Closes the current log session
*/
/*!
\fn void openlog(const char *ident, int options, int facility)
\brief Starts a log session, and sets some output options
Like openlog_thread() this function defines the log session in thread context; the
global options set by openlog_team() are not affected by this function.
*/
/*!
\fn int setlogmask(int priorityMask)
\brief sets the logging priority mask
*/
/*!
\fn void syslog(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*!
\fn void closelog_team(void)
\brief Closes the log
*/
/*!
\fn void openlog_team(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
This function defines the team-wide logging options. Thread local sessions
started with openlog() or openlog_thread() will inherit the options of the
global session.
*/
/*!
\fn void log_team(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*!
\fn int setlogmask_team(int priorityMask)
\brief sets the logging priority mask
*/
/*!
\fn void closelog_thread(void)
\brief Closes the log
*/
/*!
\fn void openlog_thread(const char *ident, int logopt, int facility)
\brief Starts a log session, and sets some output options
*/
/*!
\fn void log_thread(int priority, const char *message, ...)
\brief sends a message to the system log
*/
/*!
\fn int setlogmask_thread(int priorityMask)
\brief sets the logging priority mask
*/
/*!
\name Options for openlog()
*/
//! @{
/*!
\def LOG_PID
\brief Log the process (thread/team) ID with each message
*/
/*!
\def LOG_CONS
\brief Log to the system console on error
*/
/*!
\def LOG_ODELAY
\brief Delay open until syslog() is called
*/
/*!
\def LOG_NDELAY
\brief Connect to the syslog daemon immediately
*/
/*!
\def LOG_SERIAL
\brief Dump to serial output as well.
\attention This is not yet implemented
*/
/*!
\def LOG_PERROR
\brief Dump to stderr as well
*/
/*!
\def LOG_NOWAIT
\brief Do not wait for child processes
*/
//! @}
/*!
\name Facilities for openlog()
*/
//! @{
/*!
\def LOG_KERN
\brief Reserved for messages generated by the kernel.
*/
/*!
\def LOG_USER
\brief Reserved for messages generated by user processes.
*/
/*!
\def LOG_MAIL
\brief Standard (?) POSIX facility for messages by the mailing daemon.
*/
/*!
\def LOG_DAEMON
\brief Standard POSIX (?) facility for messages by daemons (and Haiku servers).
*/
/*!
\def LOG_AUTH
\brief Standard POSIX facility(?) for messages by the authentication services.
*/
/*!
\def LOG_SYSLOG
\brief Reserved for messages generated by the syslog daemon.
*/
/*!
\def LOG_LPR
\brief Reserved for messages generated by the UNIX lpr printing tool.
*/
/*!
\def LOG_NEWS
\brief Reserved for messages generated by something UNIXy that does something with NEWS.
*/
/*!
\def LOG_UUCP
\brief Reserved for messages generated by UUCP
*/
/*!
\def LOG_CRON
\brief Reserved for messages generated by the CRON daemon.
*/
/*!
\def LOG_AUTHPRIV
\brief Reserved for private (?) messages that relate to authentication.
*/
/*!
\def LOG_LOCAL0
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL1
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL2
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL3
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL4
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL5
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL6
\brief Use this for local use.
*/
/*!
\def LOG_LOCAL7
\brief Use this for local use.
*/
//! @}
/*!
\name Priorities for syslog(), log_team() and log_thread()
*/
//! @{
/*!
\def LOG_EMERG
\brief A panic condition
*/
/*!
\def LOG_PANIC
\brief An alias for LOG_EMERG
*/
/*!
\def LOG_ALERT
\brief A condition to that should be corrected immediately
*/
/*!
\def LOG_CRIT
\brief Critical conditions like hard drive errors
*/
/*!
\def LOG_ERR
\brief Errors
*/
/*!
\def LOG_WARNING
\brief Warnings
*/
/*!
\def LOG_NOTICE
\brief Notices, instructions on how to use certain configuration options.
*/
/*!
\def LOG_INFO
\brief Information, like versions and so.
*/
/*!
\def LOG_DEBUG
\brief Debug information.
*/\
//! @}
/*!
\def LOG_MASK
\brief Converts a priority definition for use in setlogmask()
*/