armonik.worker package

Submodules

armonik.worker.seqlogger module

class armonik.worker.seqlogger.ClefLogger(name: str | None = None, level: int = 20)

Bases: object

critical(message: str, **kwargs)

Log a message at the critical level

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • **kwargs – Keyword arguments added to the record

debug(message: str, **kwargs)

Log a message at the debug level

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • **kwargs – Keyword arguments added to the record

error(message: str, **kwargs)

Log a message at the error level

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • **kwargs – Keyword arguments added to the record

exception(message: str, exc_info: BaseException | Tuple[Type[BaseException], BaseException, TracebackType | None] | bool | None = None, **kwargs)

Log a message at the error level with an optional exc_info

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • exc_info – Optional exc_info to add to an exception record, can be an exception, a boolean (to add the result of sys.exc_info() automatically if true), or the tuple given by sys.exc_info()

  • **kwargs – Keyword arguments added to the record

classmethod getLogger(name: str) ClefLogger

Get the logger with the given name. Creates it if it doesn’t exist

Parameters:

name – Name of the logger

Returns:

ClefLogger logger of the requested name

info(message: str, **kwargs)

Log a message at the info level

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • **kwargs – Keyword arguments added to the record

log(level: int, message: str, exc_info: BaseException | Tuple[Type[BaseException] | None, BaseException | None, TracebackType | None] | None | bool = None, **kwargs)

Log a message

Parameters:
  • level – level of the message

  • message – Message content, can contain ‘{name}’ where name is an keyword argument given to this function (see kwargs)

  • exc_info – Optional exc_info to add to an exception record, can be an exception, a boolean (to add the result of sys.exc_info() automatically if true), or the tuple given by sys.exc_info()

  • **kwargs – Keyword arguments added to the record

setLevel(level: int)

Sets the level of this logger

Parameters:

level – Logging level

classmethod setup_logging(minlevel: int = 20) None

Activates logging, should only be done once per process

Parameters:

minlevel – Minimum level of logging for the whole process

warning(message: str, **kwargs)

Log a message at the warning level

Parameters:
  • message – Message content, can contain ‘{name}’ where name is a keyword argument given to this function (see kwargs)

  • **kwargs – Keyword arguments added to the record

armonik.worker.taskhandler module

armonik.worker.worker module

Module contents