logger

Filter messages to output, and specify location where these messages are output.

Synopsis:

logger filter[,filter,...] output_dest

Options:

filters
Output information for the specified message type or types. Specify one or more types, separated by commas (see below).
output_dest
The output destination for the messages specified by the filters. Specify only one (1) output per logger instance. Supported output destinations are stdout, stderr, and slog.

Description

You may specify from zero (0) to many logger options for a VM.

Log message are filtered by the severity of the condition that caused the message to be emitted. Supported message types are:

Filter Severity
fatal A fatal error; the qvm process can't continue.
internal An internal error in the qvm process has been detected; the process terminates immediately.
error An error that may or may not cause the qvm process to stop, but which indicates a problem that requires immediate attention.
warn The qvm process is able to continue, but has encountered a problem that should be addressed.
info Output information requested by the user (e.g., in response to a SIGUSR1 signal).
debug Provide information useful to QNX when debugging user-reported issues.
verbose Provide users with detailed information useful for debugging their system.

Using logger filters

Filters are not like verbosity levels, where each verbosity level outputs increasingly trivial messages. Filters are combined. You must specify the filter for every type of message you want to output. For example, specifying logger error stderr outputs only errors. It doesn't output errors and fatal errors. To get both you must specify logger error,fatal stderr.

Default configuration

If no logger is specified in the qvm configuration file, to ensure that as a minimum a record of errors and fatal errors is sent to stderr, the following logger configuration is nonetheless assumed:

logger error,fatal,internal,warn,info stderr

Overriding the default configuration

An explicit configuration overrides the default configuration For example:

logger error,warn,info slog

overrides the default output location (i.e., stderr), and directs output to slog only.

If you want to output to both stderr and slog, you must specify both output destinations separately, as follows:

logger error,warn,info slog
logger error,warn,info stderr

Examples:

The following are examples of how the logger option might be used. Note that in all the examples, only one output destination is specified per line:

logger warn,error,fatal stderr
logger info stdout
logger error,fatal,info,warn slog
logger error,fatal,info,warn stderr
logger internal,debug slog

Note also that error,fatal,info,warn is repeated to direct the output to both slog and stderr.