bittensor.btlogging
#
Standardized logging for Bittensor.
Module Contents#
Classes#
Standardized logging for Bittensor. |
Functions#
Attributes#
- bittensor.btlogging.logger#
- class bittensor.btlogging.logging#
Standardized logging for Bittensor.
- classmethod _format(prefix, sufix=None)#
Format logging message
- 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 config()#
Get config from the argument parser.
- Returns:
bittensor.config object
- classmethod exception(prefix, sufix=None)#
Exception logging with traceback
- classmethod help()#
Print help to stdout
- classmethod log_filter(record)#
Filter out debug log if debug is not on
- classmethod log_formatter(record)#
Log with different format according to record[‘extra’]
- classmethod log_save_filter(record)#
- classmethod log_save_formatter(record)#
- 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 success(prefix, sufix=None)#
Success logging