Logging: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
Line 66: Line 66:
{|
{|
|-valign="top"
|-valign="top"
|width="10%"|'''Log levels 0, 1, 2 and 3'''||System generated warning messages such as OS failures and abnormal exits.
|width="20%"|'''Log levels 0, 1, 2 and 3'''||System generated warning messages such as OS failures and abnormal exits.
|-valign="top"
|-valign="top"
|width="10%"|'''Log level 5 or above'''||User Logon data, including any attempts.
|width="20%"|'''Log level 5 or above'''||User Logon data, including any attempts.
|-valign="top"
|-valign="top"
|width="10%"|'''Log level 6 or above'''||Starting a BR program, exiting.
|width="10%"|'''Log level 6 or above'''||Starting a BR program, exiting.

Revision as of 17:36, 29 March 2013

The Logging config statement is provided for logging configuration errors:

Loglevel' is the maximum level of detail to be logged:

MAJOR_ERROR 0 causes major problems during execution
NOTABLE_ERROR 1 unexpected error likely to cause problems
MINOR_ERROR 2 unexpected error that can be ignored
MAJOR_EVENT 3 starting program, exiting, shelling ...
SECURITY_EVENT 4 logons, logon attempts etc
MINOR_EVENT 5 individual commands ...
DEBUGGING_EVENT 9 added for debugging purposes

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 log level.

+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.

NOTE: (Under Windows), it can be useful to run a third-party debugger to record and handle errors. One option is to RUN DRWTSN32 to set Dr. Watson as your default application debugger. There is no way for BR! to trap some errors under Windows. However, if Dr. Watson is activated, the logs produced at the point of error can help you to take care of them. Also, running DRWTSN32 with no flags places it in a menu driven mode that can enable you to override the Dr. Watson log file directory.

(unfiltered) BR! 4.3 Enhancments

The debug versions of BR now expect you to use a LOGGING configuration statement.

Message Levels are compared with Log Levels during the filtering process. The Logging Level is meant to specify the level of detail to be logged. The following types of messages are to be written to the LOGGING file:

  • Config error messages based on their assigned level of importance.
  • DEBUG_STR() messages where message-level is equal to or less than the DEBUG_LOG_LEVEL.

Note that the lower the DEBUG_STR() message level, the less likely it will be filtered out of the log.


Log levels 0, 1, 2 and 3 System generated warning messages such as OS failures and abnormal exits.
Log level 5 or above User Logon data, including any attempts.
Log level 6 or above Starting a BR program, exiting.
Log level 8 or above Commands such as COPY plus shell calls with parameters.
Log level 11 or above Any PRINT output that goes to the console is also logged (GUI ON only).
Log level 12 or above TRACE, and DISPLAY messages.
Log level 13 or above Lots of what the system is doing now messages.

See Also