User Tools

Site Tools


wiki:development:debugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:development:debugging [2013/03/08 17:05]
sunweaver [Debugging X2Go Session Broker]
wiki:development:debugging [2018/03/15 11:40] (current)
ionic Nope, we mean hyphens, not dashes.
Line 12: Line 12:
 root@x2goserver:​~$ tail -f /​var/​log/​syslog | grep x2go root@x2goserver:​~$ tail -f /​var/​log/​syslog | grep x2go
 </​code>​ </​code>​
 +
 +Other logging locations apart from the system'​s log are:
 +
 +  * X2Go Server: ''/​var/​log/​syslog''​
 +  * X2Go Client: stderr (use ''​%%--debug%%''​)
 +  * PyHoca-GUI: stderr (use ''​%%--libdebug --debug%%''​)
 +  * Xsession itself: ''​$HOME/​.xsession-x2go-errors''​
 +  * NX (server-side):​ ''​$HOME/​.x2go/​C-<​sessionid>/​session.*''​
 +  * NX (client-side):​ ''​$HOME/​.x2go/​S-<​sessionid>/​session.*''​
  
 ===== Enable Debug Output ===== ===== Enable Debug Output =====
  
-==== Debugging ​x2goserver ​====+==== Debugging ​X2Go Server ​====
  
 The ''​x2goserver''​ log level can be set by editing: The ''​x2goserver''​ log level can be set by editing:
Line 39: Line 48:
  
 <​file>​ <​file>​
-root@x2goserver:~$ editor /​etc/​cups/​cups-x2go+root@printserver:~$ editor /​etc/​cups/​cups-x2go
 </​file>​ </​file>​
  
Line 52: Line 61:
 The log files normally get written to ''/​var/​log/​x2gobroker/​*.log''​ The log files normally get written to ''/​var/​log/​x2gobroker/​*.log''​
  
 +You can also run 
 +<​file>​
 +root@broker:​~$ x2gobroker-daemon-debug
 +</​file>​
 +
 +as user ''​root''​. This is equivalent to running the broker daemon provided by the package ''​x2gobroker-daemon'',​ but you will see all output piped to stderr while the X2Go Session Broker daemon runs in foreground mode.
 ==== Python X2Go / PyHoca Debugging ==== ==== Python X2Go / PyHoca Debugging ====
  
-The PyHoca clients both have a ''​--libdebug''​ option. Run ''​pyhoca-gui''​ or ''​pyhoca-cli''​ from the command line with that option enabled and you get blasted with debug output.+The PyHoca clients both have a ''​%%--libdebug%%''​ option. Run ''​pyhoca-gui''​ or ''​pyhoca-cli''​ from the command line with that option enabled and you get blasted with debug output.
  
 ===== Customizing Debug Messages ===== ===== Customizing Debug Messages =====
Line 62: Line 77:
 Here is a little howto that explains how to add extra log output to X2go server scripts: Here is a little howto that explains how to add extra log output to X2go server scripts:
  
-==== Logging in X2Go Perl Scripts ====+==== Logging in X2Go Server'​s ​Perl Scripts ====
  
-Whereever you want to write a line to syslog from an X2Go Perl script, place this command:+Whereever you want to write a line to syslog from an X2Go Server'​s ​Perl script, place this command:
  
 <​code>​ <​code>​
Line 71: Line 86:
  
  
-==== Logging in X2go Shell/Bash Scripts ====+==== Logging in X2Go Server'​s ​Shell/Bash Scripts ====
  
 Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command: Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command:
Line 80: Line 95:
  
  
 +==== Logging in X2Go Session Broker'​s Python Module ====
 +
 +Whereever you want to write a line to ''/​var/​log/​x2gobroker/​broker.log''​ from one of the python-x2gobroker module files, place this command:
 +
 +<​code>​
 +# at the top of the module file:
 +from x2gobroker.loggers import logger_broker
 +# [...] then further below, wherever needed:
 +logger_broker.debug('<​your message>'​)
 +</​code>​
  
  
wiki/development/debugging.1362762351.txt.gz ยท Last modified: 2013/03/08 17:05 by sunweaver