8.6 SAL Message Filtering

SAL has been enhanced to log extensive information on errors on demand. Function calls can be traced with arguments in the debug builds.

8.6.1 Configuring the Severity Levels

You can use the SAL_LogLevels parameter to configure the severity levels for the SAL messages. SAL_LogLevels is a comma-separated list of desired log levels.

The log levels are explained in the table below:

Table 8-4 SAL Message Filtering Parameters

Parameter Name

Description

LogCrit

Critical Messages.

This level is enabled by default. After a critical error is logged, the system shuts down.

LogErr

All Error messages.

The system continues to function, but the results are unpredictable.

LogWarn

Warning messages.

This is just a warning given so that you are aware of some impending error.

LogInfo

Informational messages.

LogDbg

Debug messages used for debugging at the time of development.

These messages are compiled out from a release build to reduce the binary size.

LogCall

Traces the function calls. These are subset of Debug messages.

LogAll

Enables all the messages except LogCall.

A “-” at the beginning of a specific log level disables that level.

Examples

To filter based on all the log levels, except LogInfo and LogDbg, complete the following steps:

Linux

  1. Stop ndsd.

  2. Type the following command:

    export SAL_LogLevels=LogAll,-LogInfo,-LogDbg
  3. Start ndsd.

Windows

  1. Shutdown the DHost.

  2. Type the following command at command prompt:

                    set SAL_LogLevels=LogAll,-LogInfo,-LogDbg
                  
                    c:\novell\nds>dhost.exe /datadir=c:\novell\nds\DIBFiles\
                  
  3. Restart DHost.

8.6.2 Setting the Log File Path

You can use the SAL_LogFile environment variable to specify the log file location. This can be a valid file name with a valid path, or one of the following.

  • Console: All messages are logged to the console.

  • Syslog: In Linux, the messages go to the syslog. On Windows, messages are logged into a file with the name syslog. This is the default behavior for logging.

    All critical errors are always logged to syslog unless it is disabled specifically.