bittensor.btlogging
#
Standardize logging for bittensor
Module Contents#
Classes#
Standardize logging for bittensor |
Functions#
Attributes#
- bittensor.btlogging.logger#
- class bittensor.btlogging.logging#
Standardize logging for bittensor
- classmethod config()#
Get config from the argument parser Return: bittensor.config object
- classmethod help()#
Print help to stdout
- classmethod add_args(parser, prefix=None)#
Accept specific arguments fro parser
- Parameters:
parser (argparse.ArgumentParser) –
prefix (str) –
- classmethod check_config(config)#
Check config
- Parameters:
config (bittensor.config) –
- classmethod set_debug(debug_on=True)#
Set debug for the specific cls class
- Parameters:
debug_on (bool) –
- classmethod set_trace(trace_on=True)#
Set trace back for the specific cls class
- Parameters:
trace_on (bool) –
- classmethod log_filter(record)#
Filter out debug log if debug is not on
- classmethod log_save_filter(record)#
- classmethod log_formatter(record)#
Log with different format according to record[‘extra’]
- classmethod log_save_formatter(record)#
- classmethod _format(prefix, sufix=None)#
Format logging message
- classmethod success(prefix, sufix=None)#
Success logging
- classmethod warning(prefix, sufix=None)#
Warning logging