System logger
slogger2 [-b buffer_set[,buffer_set...]] [-c] [-p pid] [-U user_name | uid[:gid[,sup_gid]*]]] [-v[v]...]
QNX Neutrino
ARM, x86
The slogger2 daemon is the central manager of a system-logging framework that overcomes various limitations of the legacy slogger system. The primary goals for slogger2 are to:
The components of the system logger include:
Buffer Management
The central slogger2 process manages a region of shared RAM that's preserved across device resets. All slog2 buffers are located here and survive both process crashes and full device resets. This gives slog2 the performance benefit of writing to RAM (instead of to flash or disk) without losing logs in these scenarios. However, in the case of complete removal of power source (e.g., battery removal), any log contents in RAM will be lost.
Individual slog2 instances are allocated from this region by slogger2 and are provided to the client process, via slog2_register(), in the form of a shared memory file. The libslog2 library uses shmem_open() to access each instance.
Within each slog2 instance there may be up to four buffers defined by the client process. These buffers can be any combination of 4 KB pages. The primary intent for these buffers is to enable high-rate logging into one buffer, while preserving a longer history of low-rate logging in another.
The central slogger2 process is responsible for cleaning up the slog2 instances, including calling the shmem_unlink() function to remove the shared memory file.
Severity, verbosity, and filtering
Each log line is assigned one of the following severity levels (listed here in decreasing order):
The verbosity level controls which log lines are written in the slog2 buffer; if the severity level is greater than the verbosity level, the line is written in the buffer.
Filtering controls which log items are displayed to the user; the log contents aren't affected. You could filter the log by using (for example) grep, slog2info, or a custom log viewer.