Overview
WLog is a configurable and flexible logging system used throughout WinPR and FreeRDP. The primary concept is a hierarchy of loggers that can be configured independently. Each logger is identified by a dotted name (e.g.,core.channel, com.freerdp.client.x11) and inherits settings from its parent unless overridden.
Configuration is done entirely through environment variables — no source changes are required.
Log levels
Levels are cumulative: setting a level includes all levels below it in the hierarchy.Environment variables
Core variables
File appender variables
Journald appender variable
UDP appender variable
Format specifiers
TheWLOG_PREFIX variable controls what appears before each log message. Specifiers are prefixed with %.
A maximum of 16 specifiers can be used in a single format string.
Example prefix
Appenders
An appender defines where log output is written. Select one withWLOG_APPENDER.
CONSOLE
CONSOLE
Writes to the console. On Android,
log_print is used instead.outputstream option values:stdout— write everything to stdoutstderr— write everything to stderrdefault— errors and fatal messages go to stderr; everything else to stdoutdebug— use debug output (Windows only; behaves likedefaulton other platforms)
FILE
FILE
Writes textual log output to a file.
BINARY
BINARY
Writes log data in a binary format file.
UDP
UDP
Sends log messages to a remote host over UDP. The default target is Receive messages with netcat in a second terminal:
127.0.0.1:20000.SYSLOG
SYSLOG
Outputs log messages to syslog. No additional options are available.
Syslog support is optional and depends on build-time configuration.
JOURNALD
JOURNALD
Outputs log messages to the systemd journal.Read the journal:
Journald support is optional. It requires building with
-DWITH_LIBSYSTEMD=ON.Filtering specific modules
UseWLOG_FILTER to restrict output to particular loggers and levels. The format is a comma-separated list of <logger>:<level> pairs.
WLOG_LEVEL.
