wlog.7 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. .\" Written by David Fort (contact@hardening-consulting.com)
  2. .\" Process this file with
  3. .\" groff -man -Tascii wlog.7
  4. .\"
  5. .TH wLog 7 "June 2016" Version "2.0"
  6. .SH NAME
  7. wLog \- WinPR logging facility
  8. .SH DESCRIPTION
  9. wLog is a configurable and flexible logging system used throughout WinPR and
  10. FreeRDP.
  11. The primary concept is to have a hierarchy of loggers that can be be configured
  12. independently.
  13. .SH Appenders
  14. WLog uses different appenders that define where the log output should be written
  15. to. If the application doesn't explicitly configure the appenders the below
  16. described variable WLOG_APPENDER can be used to choose one appender.
  17. The following kind of appenders are available:
  18. .IP Binary
  19. Write the log data into a binary format file.
  20. .IP Console
  21. The console appender writes to the console. Depending of the operating system
  22. the application runs on, the output might be handled differently. For example
  23. on android log print would be used.
  24. .IP File
  25. The file appender writes the textual output to a file.
  26. .IP Udp
  27. This appender sends the logging messages to a pre-defined remote host via UDP.
  28. If no target is set the default one 127.0.0.1:20000 is used. To receive the
  29. log messages one can use netcat. To receive the default target the following
  30. command can be used:
  31. nc -u 127.0.0.1 -p 20000 -l
  32. .IP Syslog
  33. Use syslog for outputting the debug messages.
  34. .IP Journald
  35. This appender outputs messages to journald.
  36. .SH Levels
  37. The WLog are complementary, the higher level always includes the lower ones.
  38. The level list below is top down. Top the highest level.
  39. .IP TRACE
  40. print everything including packets dumps
  41. .IP DEBUG
  42. debug messages
  43. .IP INFO
  44. general information
  45. .IP WARN
  46. warnings
  47. .IP ERROR
  48. errors
  49. .IP FATAL
  50. fatal problems
  51. .IP OFF
  52. completely disable the wlog output
  53. .SH Formats
  54. The format a logger prints has the following possible options:
  55. .IP lv
  56. log level
  57. .IP mn
  58. module name
  59. .IP fl
  60. file name
  61. .IP fn
  62. function
  63. .IP ln
  64. line number
  65. .IP pid
  66. process id
  67. .IP tid
  68. thread id
  69. .IP yr
  70. year
  71. .IP mo
  72. month
  73. .IP dw
  74. day of week
  75. .IP hr
  76. hour
  77. .IP mi
  78. minute
  79. .IP se
  80. second
  81. .IP ml
  82. millisecond
  83. .PP
  84. A maximum of 16 options can be used per format string.
  85. An example that generally sets the WLOG_PREFIX for xfreerdp would look like:
  86. WLOG_PREFIX="pid=%pid:tid=%tid:fn=%fn -" xfreerdp /v:xxx
  87. .SH ENVIRONMENT
  88. .IP WLOG_APPENDER
  89. The kind of appender, the accepted values are: CONSOLE, FILE, BINARY, SYSLOG, JOURNALD or UDP
  90. .IP WLOG_PREFIX
  91. configure the prefix used for outputting the message (see Format for more details and examples)
  92. .IP WLOG_LEVEL
  93. the level to output messages for
  94. .IP WLOG_FILTER
  95. sets a filter for WLog messages. Only the filtered messages are
  96. printed. The format of the filter is a series of \<logger name\>:\<level\> separated by
  97. comas
  98. example: WLOG_FILTER=core.channel:DEBUG,dummy:TRACE
  99. will display debug messages for the core.channel logger and trace level for the dummy logger
  100. .IP WLOG_FILEAPPENDER_OUTPUT_FILE_PATH
  101. When using the file appender it may contains the output log file's path
  102. .IP WLOG_FILEAPPENDER_OUTPUT_FILE_NAME
  103. When using the file appender it may contains the output log file's name
  104. .IP WLOG_JOURNALD_ID
  105. When using the systemd journal appender, this variable contains the id used with
  106. the journal (by default the executable's name)
  107. .IP WLOG_UDP_TARGET
  108. target to use for the UDP appender in the format
  109. .B host:port
  110. .SH BUGS
  111. Please report any bugs using the bug reporting form on the
  112. .B FreeRDP
  113. web site
  114. .SH "SEE ALSO"
  115. Additional information and the latest version is available
  116. at the web site:
  117. .B http://www.freerdp.com
  118. .SH AUTHOR
  119. David Fort <contact@hardening-consulting.com> wrote this manpage from materials written
  120. by Bernhard Miklautz <bernhard.miklautz@thincast.com>.