Package x2go :: Module log :: Class X2GoLogger

[frames] | no frames]

# Class X2GoLogger

source code

    object --+
             |
            X2GoLogger

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

Instance Methods

__init__(self, name=`'``(imported)``'`, loglevel=56, tag=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code

message(self, msg, loglevel=0, tag=None) Log a message. | source code

__call__(self, msg, loglevel=0, tag=None) Log a message. | source code

`int`

get_loglevel(self) Get the current loglevel. | source code

set_loglevel(self, loglevel_name=`'``none``'`) Set log level by name. | source code

set_loglevel_quiet(self) Silence logging completely. | source code

set_loglevel_error(self) Set log level to ERROR. | source code

set_loglevel_warn(self) Set log level to WARN. | source code

set_loglevel_notice(self) Set log level to NOTICE (default). | source code

set_loglevel_info(self) Set log level to INFO. | source code

set_loglevel_debug(self) Set log level to DEBUG. | source code

enable_debug_sftpxfer(self) Additionally, switch on sFTP data transfer debugging | source code

disable_debug_sftpxfer(self) Switch off sFTP data transfer debugging. | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
| name = ``'````'``
| tag = ``'````'``
| progpid = `-1`
| level = `-1`
| destination = `sys.stderr`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, name=`'``(imported)``'`, loglevel=56, tag=None)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  - `name` (`str`) - name of the programme that uses Python X2Go
  - `loglevel` (`int`) - log level for Python X2Go
  - `tag` (`str`) - additional tag for all log entries
Overrides: object.__init__

### message(self, msg, loglevel=0, tag=None)

source code

Log a message.

Parameters:
  - `msg` (`str`) - log message text
  - `loglevel` (`int`) - log level of this message
  - `tag` (`str`) - additional tag for this log entry

### __call__(self, msg, loglevel=0, tag=None)
(Call operator)

source code

Log a message.

Parameters:
  - `msg` (`str`) - log message text
  - `loglevel` (`int`) - log level of this message
  - `tag` (`str`) - additional tag for this log entry

### get_loglevel(self)

source code

Get the current loglevel.

Returns: `int`
  current log level

### set_loglevel(self, loglevel_name=`'``none``'`)

source code

Set log level by name.

Parameters:
  - `loglevel_name` (`str`) - name of loglevel to be set