mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Add a file that I forgot in the last commit; Also update some comments.
This commit is contained in:
@@ -137,8 +137,60 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: openlog
|
||||
*
|
||||
* Description:
|
||||
* The openlog() function sets process attributes that affect subsequent
|
||||
* calls to syslog(). The ident argument is a string that is prepended to
|
||||
* every message. The logopt argument indicates logging options. Values
|
||||
* for logopt are constructed by a bitwise-inclusive OR of zero or more of
|
||||
* the following:
|
||||
*
|
||||
* LOG_PID - Log the process ID with each message. This is useful for
|
||||
* identifying specific processes.
|
||||
*
|
||||
* LOG_CONS - Write messages to the system console if they cannot be
|
||||
* sent to the logging facility. The syslog() function ensures that
|
||||
* the process does not acquire the console as a controlling terminal
|
||||
* in the process of writing the message.
|
||||
*
|
||||
* LOG_NDELAY - Open the connection to the logging facility immediately.
|
||||
* Normally the open is delayed until the first message is logged.
|
||||
* This is useful for programs that need to manage the order in which
|
||||
* file descriptors are allocated.
|
||||
*
|
||||
* LOG_ODELAY - Delay open until syslog() is called.
|
||||
*
|
||||
* LOG_NOWAIT - Do not wait for child processes that may have been
|
||||
* created during the course of logging the message. This option
|
||||
* should be used by processes that enable notification of child
|
||||
* termination using SIGCHLD, since syslog() may otherwise block
|
||||
* waiting for a child whose exit status has already been collected.
|
||||
*
|
||||
* The facility argument encodes a default facility to be assigned to all
|
||||
* messages that do not have an explicit facility already encoded. The
|
||||
* initial default facility is LOG_USER.
|
||||
*
|
||||
* It is not necessary to call openlog() prior to calling syslog().
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if 0 /* Not supported */
|
||||
void openlog(FAR const char *ident, int option, int facility);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: closelog
|
||||
*
|
||||
* Description:
|
||||
* The openlog() and syslog() functions may allocate a file descriptor.
|
||||
* The closelog() function will close any open file descriptors allocated
|
||||
* by previous calls to openlog() or syslog().
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if 0 /* Not supported */
|
||||
void closelog(void);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user