Logging
The Logging config statement is provided for logging configuration errors:
LOGGING <loglevel>, <logfile> [, UNATTENDED] [, DEBUG_LOG_LEVEL=<integer>] [, +CONSOLE]
Loglevel is the maximum level of detail to be logged:
0 | MAJOR_ERROR | causes major problems during execution |
1 | NOTABLE_ERROR | unexpected error likely to cause problems
System generated warning messages such as OS failures and abnormal exits. |
2 | MINOR_ERROR | unexpected error that can be ignored
System generated warning messages such as OS failures and abnormal exits. |
3 | MAJOR_EVENT | starting program, exiting, shelling ...
System generated warning messages such as OS failures and abnormal exits. |
4 | SECURITY_EVENT | logons, logon attempts etc |
5 | MINOR_EVENT | individual commands ...
User Logon data, including any attempts. |
6 | Starting a BR program, exiting. | |
8 | Commands such as COPY plus shell calls with parameters. | |
9 | DEBUGGING_EVENT | added for debugging purposes |
11 | Any PRINT output that goes to the console is also logged (GUI ON only). | |
12 | TRACE, and DISPLAY messages. | |
13 | Lots of what the system is doing now messages. |
Logfile denotes where the logging records will be kept.
The UNATTENDED keyword will cause BR to run in unattended mode, without a startup screen and until a program begins to await operator input, when it will exit.
DEBUG_LOG_LEVEL (available as of 4.3) specifies the log level for debugging log messages independently of the standard log level. If not specified, the Debug_Log_Level is set to the standard loglevel.
+CONSOLE (4.3) applies only when GUI is ON and specifies that all logging messages also go to the console and the console is to be left visible when not attached to MyEditBR. (Console logging output is supressed when GUI is OFF.)
Examples
LOGGING 2, logfile
shows unsupported escape sequences encountered.
LOGGING 5, logfile
shows unsupported escape sequences encountered plus intentionally ignored escape sequences.
LOGGING 2, logfile ,UNATTENDED
shows unsupported escape sequences encountered, and runs BR in 'Unattended' mode, bypassing start-up screen and terminating BR at the end of processing or when input is required. Supported in 4.18 in Windows and 4.20 under Linux.
LOGGING ,,UNATTENDED
runs in Unattended mode without log file.
Any config messages that occur after this config statement will be sent only to the logfile, mostly with NOTABLE_ERROR. It avoids displaying those REMed out statements in front of operators.
Any config messages that occur before the config statement logging will be sent only to the screen. These will cause BR to pause a few seconds so that the messages can be viewed.
Logging Abnormal Termination
A new logging capability is provided for handling BRServer failures. An error log file in the BRServer directory is appended to when a BRServer process is abnormally ended. Also, a client msgbox is displayed when an assertion failure or program crash occurs. On Unix systems, the system error log is also updated. Keepalive failures are also logged here.
As of 4.3 the debug versions of BR expect you to use a Logging configuration statement.