messages are controlled by the following standard options for the sm_server sm_service command and environment variables.

For the sm_service sm_server options that use a minimum security level, the level can be: none, emergency, alert, fatal, critical, error, warning, notice, informational, and debug. Note that fatal is equivalent to emergency, alert, or critical. Foundation software (DMT) message loggingdisplays the range of security levels.

  • Option --output[= <file>]

    Write all logging output for an application to an log file in the BASEDIR/smarts/local/logs directory. The name of the log file is <file>_ <locale>_ <encoding>.log, or the --logname value if <file>is omitted. If --output is not specified in the invocation line, then no logs are produced.

  • Option --errlevel= <min_severity_level>

    Used by the exception logging mechanism to determine the minimum exception level for writing messages to the log files. By default, --errlevel is set to warning. Exceptions below this level are not written to the log files.

  • Option --loglevel= <min_severity_level>

    Used by the exception logging mechanism to determine the minimum exception level for sending messages to the system error logger. By default, --loglevel is set to error. Exceptions below this level are not forwarded to the system error logger.

  • Option --logname= <name>

    Used to specify the name of the log file and the name of the sending application in messages destined for the system error logger. The default is the name of the application specified by the --name option (or just -n).

  • Option --tracelevel= <min_severity_level>

    Used to print a stack trace to the log file when an exception at this level or above occurs. By default, --tracelevel is set to fatal. Exceptions below this level do not write a stack trace.

  • Environment variable SM_MAIN_OPTIONS

    Used to set the defaults for the standard options for all applications. For example,

    SM_MAIN_OPTIONS=--loglevel=None
  • Environment variable SM_LOGFILES

    Used to change the default log location for log files from BASEDIR/smarts/local/logs to a user-specified location.

    Example

    SM_LOGFILES=/u/ps/johndoe/ic/logs

    The sm_service command line on page 68provides additional information about sm_service command options. Starting a Domain Manager on page 60provides additional information about sm_server command options. Appendix A, Environment Variables Used by ITOps Software,provides additional information about environment variables.

    Note:

    In Foundation software (DMT) message logging, the levels emergency, alert, and critical are not shown; fatal is equivalent to emergency, alert, or critical.

    Figure 1. Foundation software (DMT) message logging
    Note:

    An application that makes use of the logging mechanism will make use of the flow in Foundation software (DMT) message loggingto log message to either the log file or to the exception logging mechanism. Applications that write directly to stdout or stderr will not abide by this flow diagram.