= We have moved = This page has been moved to [https://github.com/Xpra-org/xpra/blob/master/docs/Usage/Logging.md] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] ''Archived copy:'' {{{#!div class="box" = Logging = Sometimes the problem is so obvious that you will simply get the error directly from the command line or in the server log file. }}} {{{#!div class="box" == Basic Logging == Otherwise, a good first step is to start xpra from the command line and add "{{{-d CATEGORY}}}" to it, for example to debug geometry issues: {{{ xpra attach -d geometry }}} The full list of debugging categories can be found with {{{xpra -d help}}}, see [/wiki/Logging/Categories] for a command output example. Use the special category value "all" to enable all logging. (this will be very verbose) [[BR]] You can also prefix the {{{CATEGORY}}} with a dash "{{{-}}}" to disable debug logging for it. For example, to log everything except the "window" category: {{{ xpra start :10 -d all,-window }}} }}} {{{#!div class="box" == Environment Variables == Each logging category can also be enabled using environment variables, which can be useful if you cannot modify the command line, or if the logging should happen very early on, or if you aren't calling the code from its normal wrappers. Use: {{{XPRA_CATEGORY_DEBUG=1 xpra ...}}} to enable debug logging for your chosen {{{CATEGORY}}}. For example, to enable "geometry" debugging with the attach subcommand use: {{{ XPRA_GEOMETRY_DEBUG=1 xpra attach }}} }}} {{{#!div class="box" == Xpra control interface == [[BR]] It is also possible to enable and disable debug logging of a server at runtime using: {{{ xpra control :DISPLAY debug enable CATEGORY }}} and {{{ xpra control :DISPLAY debug enable CATEGORY }}} And you can get the current list of debug loggers which: {{{ xpra control :DISPLAY debug status }}} These commands are also available trough the server's dbus interface, see #904. == Toggle !Server/Client verbose logging on live instances == You can do things like: * enable many categories: {{{ xpra control :2 client debug enable window geometry screen }}} * enable loggers that match both categories: {{{ xpra control :2 client debug disable focus+grab }}} ''Source: ticket:2658#comment:8'' }}} [[BR]] {{{#!div class="box" == Detailed Logging == Some subsystems require special environment variables to enable logging, this is to minimize the cost of logging in performance critical paths. In particular the X11 bindings which can process thousands of events per second. For example: * x11 event handling: {{{ XPRA_X11_DEBUG_EVENTS="*" xpra start :10 }}} or {{{ XPRA_X11_DEBUG_EVENTS="EnterNotify,CreateNotify" xpra start :10 }}} * {{{XShm}}} and {{{image}}} debugging code: {{{ XPRA_XSHM_DEBUG=1 xpra start :10 }}} or {{{ XPRA_XIMAGE_DEBUG=1 xpra start :10 }}} Please refer to the source code for details and more up to date information. }}}