x2go.log module

X2GoLogger class - flexible handling of log and debug output.

class x2go.log.X2GoLogger(name='/usr/bin/sphinx-build', loglevel=56, tag=None)[source]

Bases: object

A simple logger class, that is used by all Python X2Go classes.

destination = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>
disable_debug_sftpxfer()[source]

Switch off sFTP data transfer debugging.

enable_debug_sftpxfer()[source]

Additionally, switch on sFTP data transfer debugging

get_loglevel()[source]

Get the current loglevel.

Returns:current log level
Return type:int
level = -1
message(msg, loglevel=0, tag=None)[source]

Log a message.

Parameters:
  • msg (str) – log message text
  • loglevel (int) – log level of this message (Default value = loglevel_NONE)
  • tag (str) – additional tag for this log entry (Default value = None)
name = ''
progpid = -1
set_loglevel(loglevel_name='none')[source]

Set log level by name.

Parameters:loglevel_name (str) – name of loglevel to be set (Default value = ‘none’)
set_loglevel_debug()[source]

Set log level to I{DEBUG}.

set_loglevel_error()[source]

Set log level to I{ERROR}.

set_loglevel_info()[source]

Set log level to I{INFO}.

set_loglevel_notice()[source]

Set log level to I{NOTICE} (default).

set_loglevel_quiet()[source]

Silence logging completely.

set_loglevel_warn()[source]

Set log level to I{WARN}.

tag = ''
x2go.log.X2goLogger

alias of X2GoLogger

x2go.log.loglevel_DEFAULT = 56

Default loglevel of X2GoLogger objects is: NOTICE & WARN & ERROR