%SYS
Logging Class Reference

This is the API for setting and getting the configuration values for the log daemon. More...

Inheritance diagram for Logging:
Collaboration diagram for Logging:

Static Public Member Functions

_.Library.Status IntervalIsValid (_.Library.Decimal value)
 Ensure the bounds are respected for the Interval configuration setting.
 
_.Library.Status SetDefault ()
 This method sets the log daemon configuration options to their default values. More...
 
- Static Public Member Functions inherited from CommonSingleMethods
_.Library.Status Get (_.Library.String Properties, _.Library.String CPFFile, _.Library.Integer Flags)
 Get a sections properties from a CPF file. More...
 
_.Library.Status GetList (_.Library.String CPFFile, _.Library.Integer Flags)
 Returns the properties from a section in a CPF file by value in $list format
More...
 
_.Library.Status Modify (_.Library.String Properties, _.Library.String CPFFile, _.Library.Integer Flags)
 Modify a sections properties in a CPF file. More...
 
_.Library.ObjectHandle Open (_.Library.String CPFFile, _.Library.Integer concurrency, _.Library.Status Status, _.Library.Integer Flags)
 Open an instance of an section object in a CPF file. More...
 

Public Attributes

 Enabled
 Property is 1 (true) if the logging daemon is enabled. More...
 
 Format
 This property determines the format of log entries. More...
 
 Interval
 The number of seconds the log daemon waits before scanning the messages.log file and SYS.Audit log. More...
 
 Level
 This property sets the minimum level of message from the console.log that the logging daemon will. More...
 
- Public Attributes inherited from CommonProperties
 CPFFile
 CPF file which the object maps to. More...
 
 Comments
 Embedded comments in the CPF file. More...
 
 Flags
 Flags governing how the object is processed when Save() is called. More...
 
 Name
 Name of the object instance. More...
 

Additional Inherited Members

- Static Public Attributes inherited from CommonProperties
 DOMAIN = None
 This class contains properties which are included by classes which manipulate sections in the CPF file. More...
 

Detailed Description

This is the API for setting and getting the configuration values for the log daemon.

Use this class to set and get the configuration values for the log daemon. See <class>SYS.LogDmn</class> for the top level API for starts and stops the daemon.

Member Function Documentation

◆ SetDefault()

_.Library.Status SetDefault ( )
static

This method sets the log daemon configuration options to their default values.

You can find the default value for each configurable property by looking at the InitialExpression property keyword in this class (<class>Config.Logging</class>)

Member Data Documentation

◆ Enabled

Enabled

Property is 1 (true) if the logging daemon is enabled.

If property is 0 (false), any attempt to start the daemon will fail. Setting <property>Enabled</property> to 1 will NOT start the daemon. To start the daemon that, invoke ##class(SYS.LogDmn).Start() after setting this property equal to 1.  

◆ Format

Format

This property determines the format of log entries.

This property can currently take two values: "NVP" and "JSON" This property is not case sensitive. If Format="NVP", then entries will look like when="2023-10-17 19:25:16.190" pid=89734 level=INFO event=Audit.OSCommand text="Execute O/S command" ... If Format="JSON" then entries will look like { "when": "2023-10-17 18:47:26.244", "pid": "89317" }  

◆ Interval

Interval

The number of seconds the log daemon waits before scanning the messages.log file and SYS.Audit log.

for new entries. The messages.log file can be determined by calling

class(Config.config).GetConsoleFileName()

<property>Interval</property> may be expressed as a decimal up to two digit points (to the 10th of a millisecond) and can be no larger than 3600 (equivalent to 1 hour). For example, the following values of <property>Interval</property> are valid 0.10 - Wait 100 ms before rescanning for the messages.log and SYS.Audit log for new entries 0.01 - Wait 10 ms before rescanning for the messages.log and SYS.Audit log for new entries 1.5 - Wait 1.5 seconds before rescanning the messages.log and SYS.Audit log for new entries 10 - Wait 10 seconds before rescanning the messages.log and SYS.Audit log for new entries 3600 - Wait 3600 seconds (1 hour) before rescanning the messages.log and SYS.Audit for new entries  

◆ Level

Level

This property sets the minimum level of message from the console.log that the logging daemon will.

emit. This property is case insensitive. For instance, if <property>Level</property> is "INFO", then the logging daemon will only emit messages from the console.log whose level is INFO, WARN, SEVERE, or FATAL. Set <property>Level</property> to be "FATAL" if you only wish the log daemon to be terse and only consider fatal errors, and set <property>Level</property> to be "DEBGUG2" if you wish the log daemon verbose and emit all messages from the messages.log and SYS.Audit log