loggers module

Provides logging functionality.

class loggers.LogManager(name, level, areas, filepath=None, log_format=None, date_format=None, encoding='utf-8', prefix=None)[source]

Bases: core.AutoUnload, loggers._LogInstance

Main log class used as a root to create children instances.

__init__(name, level, areas, filepath=None, log_format=None, date_format=None, encoding='utf-8', prefix=None)[source]

Store the base values and creates the logger.

Parameters:
  • name (str) – Name of the base logger.
  • level (ConVar) – A console variable that defines required level to log a message.
  • areas (ConVar) – A console variable that defines the areas where messages are getting logged.
  • filepath (str) – A file where messages are getting logged.
  • log_format (str) – A custom log format that defines the appearance of the messages.
  • date_format (str) – A custom date format that defines how the date is printed.
areas

Return the areas to print messages to.

Return type:int
level

Return the needed level value.

Return type:int