Version 3 (modified by 7 years ago) (diff) | ,
---|
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.
Basics
Otherwise, a good first step is to start xpra from the command line and add "-d CATEGORY
" to it. The list of categories can be found with xpra -d help
.
You can also prefix the CATEGORY
with a dash "-
" to disable debug logging for it. ie:
xpra start :10 -d all,-window
Environment Variables
Each logging category can also be enabled using environment variable, 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
.
Xpra control interface
It is also possible to enable and disable debug logging 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
Detailed Logging
Some subsystems require special environment variables to enable logging, this is to minimize the cost of logging in performance critical paths.
For example:
- x11 event handling:
XPRA_X11_DEBUG_EVENTS="*" xpra start :10
or
XPRA_X11_DEBUG_EVENTS="EnterNotify,CreateNotify" xpra start :10
XShm
andimage
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.
Logging Categories
You can get the list of debugging categories with a brief explanation by running (version 0.16 onwards only):
$ xpra -d help known logging filters: Client: * client : All client code * paint : Client window paint code * cairo : Cairo paint code used with the GTK3 client * opengl : Client OpenGL rendering * events : System and window events * info : About and Session info dialogs * launcher : The client launcher program General: * clipboard : All clipboard operations * notify : Notification forwarding * tray : System Tray forwarding * printing : Printing * file : File transfers * keyboard : Keyboard mapping and key event handling * screen : Screen and workarea dimension * xsettings : XSettings synchronization * dbus : DBUS calls Window: * window : All window code * shape : Window shape forwarding (XShape) * focus : Window focus * workspace : Window workspace synchronization * metadata : Window metadata * state : Window state * icon : Window icons Encoding: * codec : FIXME: only nvenc4 and nvenc5, loader and video helper * loader : Pixel compression codec loader * video : Video codecs * score : Video pipeline scoring and selection * encoding : Server side encoding selection and compression * scaling : Scaling: automatic scaling calculations * delta : Delta pre-compression * xor : XOR delta pre-compression * subregion : Video subregion processing * regiondetect : Video region detection * regionrefresh : Video region refresh * refresh : Refresh of lossy screen updates * compress : Pixel compression (non video) Codec: * csc : Colourspace conversion codecs * cuda : CUDA device access (nvenc) * cython : Cython CSC module * opencl : OpenCL CSC module * swscale : swscale CSC module * decoder : All decoders * encoder : All encoders * avcodec : avcodec decoder * libav : libav common code (swscale and avcodec) * vpx : libvpx encoder and decoder * nvenc : nvenc encoder (all versions) * x264 : libx264 encoder * webp : libwebp encoder and decoder Pointer: * mouse : Mouse motion * cursor : Mouse cursor shape Misc: * gtk : All GTK code: bindings, client, etc * util : All utility functions * gobject : Command line clients * test : Test code * verbose : Very verbose flag Network: * network : All network code * mmap : mmap transfers * protocol : Packet input and output (formatting, parsing, sending and receiving) * crypto : Encryption * auth : Authentication Server: * server : All server code * proxy : Proxy server * shadow : Shadow server * command : Server control channel * timeout : Server timeouts * mdns : mDNS session publishing * stats : Server statistics * grab : Window grabs * xshm : XShm pixel capture Sound: * sound : All sound * av-sync : Audio-video sync X11: * x11 : All X11 code * bindings : X11 Cython bindings * core : X11 core bindings * randr : X11 RandR bindings * ximage : X11 XImage bindings * error : X11 errors Platform: * platform : All platform support code * import : Platform support import code * osx : Mac OS X platform support code * win32 : Microsoft Windows platform support code * posix : Posix platform code