3 WLog is a configurable and flexible logging system used throughout winpr and
6 The primary concept is to have a hierarchy of loggers that can be be configured
9 TODO add more details and configuration examples.
13 # Environment variables
15 * WLOG_APPENDER - the appender to use
16 * WLOG_PREFIX - configure the prefix used for outputting the message (see
17 Format for more details and examples)
18 * WLOG_LEVEL - the level to output messages for
19 * WLOG_FILTER - sets a filter for WLog messages. Only the filtered messages are
21 * WLOG_FILEAPPENDER_OUTPUT_FILE_PATH - set the output file path for the file
23 * WLOG_FILEAPPENDER_OUTPUT_FILE_NAME - set the output file name for the output
25 * WLOG_JOURNALD_ID - identifier used by the journal appender
26 * WLOG_UDP_TARGET - target to use for the UDP appender in the format host:port
30 The WLog are complementary the higher level always includes the lower ones.
31 The level list below is top down. Top the highest level.
33 * WLOG_TRACE - print everything including package dumps
34 * WLOG_DEBUG - debug messages
35 * WLOG_INFO - general informations
36 * WLOG_WARN - warnings
38 * WLOG_FATAL - fatal problems
39 * WLOG_OFF - completely disable the wlog output
44 The format a logger prints in has the following possible options:
61 A maximum of 16 options can be used per format string.
63 An example that generally sets the WLOG_PREFIX for xfreerdp would look like:
65 WLOG_PREFIX="pid=%pid:tid=%tid:fn=%fn -" xfreerdp /v:xxx
70 WLog uses different appenders that define where the log output should be written
71 to. If the application doesn't explicitly configure the appenders the above
72 described variable WLOG_APPENDER can be used to choose one appender.
74 The following represents an overview about all appenders and their possible
79 Write the log data into a binary format file.
82 * "outputfilename", value const char* - file to write the data to
83 * "outputfilepath", value const char* - location of the output file
86 The callback appender can be used from an application to get all log messages
87 back the application. For example if an application wants to handle the log
92 * "callbacks", value struct wLogCallbacks*, callbacks to use
96 The console appender writes to the console. Depending of the operating system
97 the application runs on the output might be handled differently. For example
98 on android log print would be used.
103 * "outputstream", value const char * - output stream to write to
104 * "stdout" - write everything to stdout
105 * "stderr" - write everything to stderr
106 * "default" - use the default settings - in this case errors and fatal would
107 go to stderr everything else to stdout
108 * debug - use the debug output. Only used on windows on all operating systems
109 this behaves as as if default was set.
112 The file appender writes the textual output to a file.
116 * "outputfilename", value const char*, filename to use
117 * "outputfilepath", value const char*, location of the file
121 This appender sends the loging messages to a pre-defined remote host via UDP.
125 * "target", value const char*, target to send the data too in the format
128 If no target is set the default one 127.0.0.1:20000 is used. To receive the
129 log messages one can use netcat. To receive the default target the following
130 command could be used.
132 nc -u 127.0.0.1 -p 20000 -l
135 ### Syslog (optional)
137 Use syslog for outputting the debug messages. No options available.
139 ### Journald (optional)
141 For outputting the log messages to journald this appender can be used.
142 The available options are:
144 * "identifier", value const char*, the identifier to use for journald (default