Learn R Programming

rsyslog (version 1.0.3)

set_syslog_mask: Set the System Log Priority Mask

Description

set_syslog_mask can be used to prevent messages below a priority level from being written to the system log.

Usage

set_syslog_mask(level)

Arguments

level

Mask (hide) messages below this priority level. One of "DEBUG", "INFO", "NOTICE", "WARNING", "ERR", "CRITICAL", or "ALERT" -- in that order of priority. See RFC 5424 for the basis of this schema.

Examples

Run this code
if (FALSE) {
open_syslog("my_script")
syslog("This message is visible.", level = "INFO")
set_syslog_mask("WARNING")
syslog("No longer visible.", level = "INFO")
syslog("Still visible.", level = "WARNING")
close_syslog()
}

Run the code above in your browser using DataLab