geopyv.log

Module Contents

Classes

CustomFormatter

Override to format the std log output such that INFO logs provide

Functions

initialise(level)

Function to initialise the log file.

set_level(level)

Function to set the log level after initialisation.

class geopyv.log.CustomFormatter(fmt, fmt_INFO)

Bases: logging.Formatter

Override to format the std log output such that INFO logs provide just the log message and other levels also provide the level type.

Parameters:
  • fmt (str) – Format of general log message.

  • fmt_INFO (str) – Modified format of logging.INFO message.

format(record)

Override to provide a custom log format.

Parameters:

record (LogRecord) – Log record object.

geopyv.log.initialise(level)

Function to initialise the log file.

Parameters:

level (logging.level) – Log level. Options include: logging.VERBOSE, logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR and logging.FATAL. Defaults to logging.INFO.

geopyv.log.set_level(level)

Function to set the log level after initialisation.

Parameters:

level (logging.level) – Log level. Options include logging.VERBOSE, logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR and logging.FATAL. Defaults to logging.INFO.