-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Logging
XRDP uses the following macros to emit log messages:
LOG
: Logging macro for messages that are for a system administrator to configure and run XRDP on their machine.
LOG_DEVEL
: Logging macro for messages that are for an XRDP developer to understand and debug XRDP code.
LOG_DEVEL_HEXDUMP
: Logging macro for logging the contents of a byte array using a hex dump format.
Note: LOG
, LOG_DEVEL
, and LOG_DEVEL_HEXDUMP
add the source code file name, line number, and function name as a prefix to the log message when XRDP is compiled with XRDP_DEBUG defined.
Note: LOG_DEVEL
and LOG_DEVEL_HEXDUMP
only emit log messages when XRDP is compiled with XRDP_DEBUG defined.
The logging macros above should be used instead of the log_message
, log_message_with_location
, and log_hexdump_with_location
functions to ensure consistency of the logging features for all log messages.
For more details see the code of the logging macros
Level | Purpose |
---|---|
ERROR | for describing non-recoverable error states in a request or method |
WARNING | for describing recoverable error states in a request or method |
INFO | for low verbosity and high level descriptions of normal operations |
DEBUG | for medium verbosity and low level descriptions of normal operations |
TRACE | for high verbosity and low level descriptions of normal operations (eg. method or wire tracing) |
XRDP supports logging to the following outputs:
- console
- syslog
- log file
The logging outputs are configured independently for xrdp, xrdp-sesman, xrdp-chansrv in xrdp.ini and sesman.ini respectively, and documented in the xrdp.ini.5 and sesman.ini.5 man pages.
Process Name | Log File | Multiplicity |
---|---|---|
xrdp | xrdp.log | 1 per server |
xrdp-sesman | xrdp-sesman.log | 1 per server |
xrdp-chansrv | xrdp-chansrv.%d.log | 1 per display |
The XRDP process forks upon receiving connections and runs as multiple process. Therefore the log file is opened using O_APPEND
to allow the multiple processes to write to the same file without corrupting the log messages.