Messages are tagged with codes indicating the type of Priority for each. A Priority is encoded as a Facility , which describes the part of the system generating the message, and as a level, which indicates the severity of the message. The closelog subroutine closes the log file. The setlogmask subroutine uses the bit mask in the MaskPriority parameter to set the new log priority mask and returns the previous mask. Calls to the syslog subroutine with a priority mask that does not allow logging of that particular level of message causes the subroutine to return without logging the message.
Parameters ID Contains a string that is attached to the beginning of every message.
The Facility parameter encodes a default facility from the previous list to be assigned to messages that do not have an explicit facility encoded. LogOption Specifies a bit field that indicates logging options. Opens the connection to the syslogd command immediately, instead of when the first message is logged. This option is useful for programs that need to manage the order in which file descriptors are allocated. Logs messages to the console without waiting for forked children.