Skip to main content

Config.Logging

persistent class Config.Logging extends %Library.Persistent, Config.CommonSingleMethods, Config.CommonProperties, %SYSTEM.Help [ Final ]

SQL Table Name: Config.Logging

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 SYS.LogDmn for the top level API for starts and stops the daemon.

Property Inventory

Method Inventory

Properties

property Enabled as %Boolean [ InitialExpression = 0 ];
Property is 1 (true) if the logging daemon is enabled. If property is 0 (false), any attempt to start the daemon will fail. Setting Enabled to 1 will NOT start the daemon. To start the daemon that, invoke ##class(SYS.LogDmn).Start() after setting this property equal to 1.
Property methods: EnabledDisplayToLogical(), EnabledGet(), EnabledGetStored(), EnabledIsValid(), EnabledLogicalToDisplay(), EnabledLogicalToXSD(), EnabledNormalize(), EnabledSet(), EnabledXSDToLogical()
property Format as %String (VALUELIST = ",NVP,JSON") [ InitialExpression = "NVP" ];
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" }
Property methods: FormatCompute(), FormatDisplayToLogical(), FormatGet(), FormatGetStored(), FormatIsValid(), FormatLogicalToDisplay(), FormatLogicalToOdbc(), FormatSQLCompute(), FormatSet(), FormatSetT()
property Interval as %Decimal (MAXVAL = 3600, MINVAL = "0.01") [ InitialExpression = 10 ];
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() Interval 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 Interval 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
Property methods: IntervalDisplayToLogical(), IntervalGet(), IntervalGetStored(), IntervalLogicalToDisplay(), IntervalNormalize(), IntervalSet(), IntervalXSDToLogical()
property Level as %String (VALUELIST = ",DEBUG2,DEBUG,INFO,WARN,SEVERE,FATAL") [ InitialExpression = "WARN" ];
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 Level is "INFO", then the logging daemon will only emit messages from the console.log whose level is INFO, WARN, SEVERE, or FATAL. Set Level to be "FATAL" if you only wish the log daemon to be terse and only consider fatal errors, and set Level to be "DEBGUG2" if you wish the log daemon verbose and emit all messages from the messages.log and %SYS.Audit log
Property methods: LevelCompute(), LevelDisplayToLogical(), LevelGet(), LevelGetStored(), LevelIsValid(), LevelLogicalToDisplay(), LevelLogicalToOdbc(), LevelSQLCompute(), LevelSet(), LevelSetT()

Methods

classmethod ChildProcessLaunchCommandIsValid(value As %String) as %Status
classmethod FormatNormalize(value As %String(VALUELIST=",NVP,JSON")) as %String
classmethod IntervalIsValid(value As %Decimal(MAXVAL=3600, MINVAL=0.01)) as %Status
Ensure the bounds are respected for the Interval configuration setting
classmethod LevelNormalize(value As %String(VALUELIST=",DEBUG2,DEBUG,INFO,WARN,SEVERE,FATAL")) as %String
classmethod SetDefault() as %Status
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 (Config.Logging)

Indexes

index (CPFNameSectionHeaderName on CPFName,SectionHeader,Name) [IdKey, Type = key, Unique];
Index methods: CPFNameSectionHeaderNameCheck(), CPFNameSectionHeaderNameDelete(), CPFNameSectionHeaderNameExists(), CPFNameSectionHeaderNameOpen(), CPFNameSectionHeaderNameSQLCheckUnique(), CPFNameSectionHeaderNameSQLExists(), CPFNameSectionHeaderNameSQLFindPKeyByConstraint(), CPFNameSectionHeaderNameSQLFindRowIDByConstraint()

Inherited Members

Inherited Properties

Inherited Methods

Storage

Storage Model: Storage (Config.Logging)

^|"^^"_$ZU(12)|SYS("CONFIG")(ID)
=
%%CLASSNAME
ChildProcessLaunchCommand
Comments
Enabled
Format
Interval
Level
FeedbackOpens in a new tab