syslog

Writes a message to a system log file.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

string syslog(level, message)
int           level
string        message

Description

Returns the value of message. On Unix, this function writes to the actual syslog. On NT, it writes to the operating system's event log. On VMS, it writes to the operator log.
levelspecifies the level of logging:
  • 0 -- Informational message
  • 1 -- Warning message
  • 2 -- Error message
message specifies the text to write to the logging system.

Example

Logs two messages to the operating system's logging system.
{
 syslog(0,"whoa");
 syslog(0,"nelly");
}