libranet_logging.loglevel

libranet_logging.loglevel.

Attributes

create_loglevel_trace

Functions

create_loglevel([level_name, level_num])

Create a custom loglevel.

Module Contents

libranet_logging.loglevel.create_loglevel(level_name='', level_num=0)

Create a custom loglevel.

Defining your own levels is possible, but should not be necessary, as the existing levels have been chosen on the basis of practical experience. However, if you are convinced that you need custom levels, great care should be exercised when doing this, and it is possibly a very bad idea to define custom levels if you are developing a library. That’s because if multiple library authors all define their own custom levels, there is a chance that the logging output from such multiple libraries used together will be difficult for the using developer to control and/or interpret, because a given numeric value might mean different things for different libraries. Cfr. https://docs.python.org/3/howto/logging.html#custom-levels

Default levels:

0 NOTSET 10 DEBUG 20 INFO 30 WARNING 40 ERROR 50 CRITICAL

Parameters:
  • level_name – logger-name

  • level_num – numeric level of the custom logger, positive integer

Returns:

None

Side-effect:

adds attribute to Logger-class

libranet_logging.loglevel.create_loglevel_trace