wLog(7)

๐Ÿ“ฆ version 2.11.7, in opensuse-leap 16.0

๐Ÿ’– wLog(7) โ€” the WinPR logging facility, explained by your fave ๐Ÿ’–

okay bestie, sit down, hydrate, and let me tell you about wLog, which is section 7 of the manual, and honestly? it's the logging system that carries the whole WinPR and FreeRDP situation on its back. no cap.


โœจ DESCRIPTION โœจ

wLog is a configurable and flexible logging system used throughout WinPR and FreeRDP. like, everywhere. it's giving infrastructure.

The primary concept is to have a hierarchy of loggers that can be be configured independently. that's it. that's the whole vibe. each logger in the hierarchy does its own thing, and you can configure them separately. ๐Ÿฆ‹


๐ŸŽ€ Appenders ๐ŸŽ€

WLog uses different appenders that define where the log output should be written to. If the application doesn't explicitly configure the appenders, the below described variable WLOG_APPENDER can be used to choose one appender.

The following kind of appenders are available:

  • Binary โ€” Write the log data into a binary format file. mysterious. encrypted-ish. slay.
  • Console โ€” The console appender writes to the console. Depending of the operating system the application runs on, the output might be handled differently. For example on android log print would be used.
  • File โ€” The file appender writes the textual output to a file. old reliable fr fr.
  • Udp โ€” This appender sends the logging messages to a pre-defined remote host via UDP.

If no target is set the default one 127.0.0.1:20000 is used. To receive the log messages one can use netcat. To receive the default target the following command can be used:

nc -u 127.0.0.1 -p 20000 -l
  • Syslog โ€” Use syslog for outputting the debug messages.
  • Journald โ€” This appender outputs messages to journald. systemd girlies rise ๐Ÿ’…

๐ŸŒˆ Levels ๐ŸŒˆ

The WLog are complementary, the higher level always includes the lower ones. The level list below is top down. Top the highest level.

  • TRACE โ€” print everything including packets dumps ๐Ÿ‘€
  • DEBUG โ€” debug messages
  • INFO โ€” general information
  • WARN โ€” warnings
  • ERROR โ€” errors
  • FATAL โ€” fatal problems ๐Ÿ’€
  • OFF โ€” completely disable the wlog output (the silence era)

๐ŸŒธ Formats ๐ŸŒธ

The format a logger prints has the following possible options:

  • lv โ€” log level
  • mn โ€” module name
  • fl โ€” file name
  • fn โ€” function
  • ln โ€” line number
  • pid โ€” process id
  • tid โ€” thread id
  • yr โ€” year
  • mo โ€” month
  • dw โ€” day of week
  • hr โ€” hour
  • mi โ€” minute
  • se โ€” second
  • ml โ€” millisecond

A maximum of 16 options can be used per format string. sixteen. that's the limit, bestie, don't push it. ๐Ÿ™ˆ

An example that generally sets the WLOG_PREFIX for xfreerdp would look like:

WLOG_PREFIX="pid=%pid:tid=%tid:fn=%fn -" xfreerdp /v:xxx

๐Ÿงš ENVIRONMENT ๐Ÿงš

  • WLOG_APPENDER โ€” The kind of appender, the accepted values are: CONSOLE, FILE, BINARY, SYSLOG, JOURNALD or UDP
  • WLOG_PREFIX โ€” configure the prefix used for outputting the message (see Format for more details and examples)
  • WLOG_LEVEL โ€” the level to output messages for
  • WLOG_FILTER โ€” sets a filter for WLog messages. Only the filtered messages are printed. The format of the filter is a series of <logger name>:<level> separated by comas

example: WLOG_FILTER=core.channel:DEBUG,dummy:TRACE will display debug messages for the core.channel logger and trace level for the dummy logger

  • WLOG_FILEAPPENDER_OUTPUT_FILE_PATH โ€” When using the file appender it may contains the output log file's path
  • WLOG_FILEAPPENDER_OUTPUT_FILE_NAME โ€” When using the file appender it may contains the output log file's name
  • WLOG_JOURNALD_ID โ€” When using the systemd journal appender, this variable contains the id used with the journal (by default the executable's name)
  • WLOG_UDP_TARGET โ€” target to use for the UDP appender in the format host:port

๐Ÿ’€ BUGS ๐Ÿ’€

Please report any bugs using the bug reporting form on the FreeRDP web site. not me being a bug reporter, but like, if you find one, tell them. ๐Ÿซถ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

Additional information and the latest version is available at the web site: http://www.freerdp.com


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

David Fort <contact@hardening-consulting.com> wrote this manpage from materials written by Bernhard Miklautz <bernhard.miklautz@thincast.com>. iconic collaboration, honestly. ๐ŸŒŸ


and that's the whole thing, bestie! this one's version 2.0, from way back in June 2016, and it's literally still out here logging the world. mwah. ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from