# Python X2Go (Client) API Documentation (v0.6.1.4)

## 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)

  Bases: `object`

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

  destination = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
  disable_debug_sftpxfer()

    Switch off sFTP data transfer debugging.

  enable_debug_sftpxfer()

    Additionally, switch on sFTP data transfer debugging

  get_loglevel()

    Get the current loglevel.

    Returns:

      current log level

    Return type:

      `int`

  level = -1
  message(msg, loglevel=0, tag=None)

    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')

    Set log level by name.

    Parameters:

      loglevel_name (`str`) – name of loglevel to be set (Default value = ‘none’)

  set_loglevel_debug()

    Set log level to DEBUG.

  set_loglevel_error()

    Set log level to ERROR.

  set_loglevel_info()

    Set log level to INFO.

  set_loglevel_notice()

    Set log level to NOTICE (default).

  set_loglevel_quiet()

    Silence logging completely.

  set_loglevel_warn()

    Set log level to WARN.

  tag = ''

x2go.log.X2goLogger

  alias of `X2GoLogger`

x2go.log.loglevel_DEFAULT = 56

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