Logger
Defines a simple logger object to write log data to a file based on log levels.
LogLevel: LogLevel
default_verbosity: LogLevel
__init__(self, log_file=None, log_level=None, print_function=None, padding='', newline='\n', repad_messages=True, block_options=None):
to_state(self, serializer=None):
@classmethod
from_state(cls, state, serializer=None):
block(self, **kwargs):
register(self, key):
Registers the logger under the given key
key:Any:returns:_
@classmethod
lookup(cls, key, construct=False):
Looks up a logger. Has the convenient, but potentially surprising
behavior that if no logger is found a NullLogger is returned.
key:Any:returns:_
@staticmethod
preformat_keys(key_functions):
Generates a closure that will take the supplied keys/function pairs and update them appropriately
key_functions:Any:returns:_
format_message(self, message, *params, preformatter=None, _repad=None, _newline=None, _padding=None, **kwargs):
format_metainfo(self, metainfo):
pad_newlines(self, obj, padding=None, newline=None, **kwargs):
@staticmethod
split_lines(obj):
@staticmethod
prep_array(obj):
@staticmethod
prep_dict(obj):
log_print(self, message, *messrest, message_prepper=None, padding=None, newline=None, log_level=None, metainfo=None, print_function=None, print_options=None, sep=None, end=None, file=None, flush=None, preformatter=None, **kwargs):
message:str | Iterable[str]message to print
params:Anyprint_options:Anyoptions to be passed through to print
kwargs:Any:returns:_
__repr__(self):