4.7.3.5. Logs

Constants for logging.

axonius_api_client.constants.logs.LOG_FMT_VERBOSE: str = '%(asctime)s %(levelname)-8s [%(name)s:%(module)s:%(funcName)s:%(pathname)s:%(lineno)d] %(message)s'

Logging format to use for verbose logging.

axonius_api_client.constants.logs.LOG_FMT_BRIEF_SRC: str = '%(levelname)-8s [%(name)s in %(module)s] %(message)s'

Logging format to use for brief logging.

axonius_api_client.constants.logs.LOG_FMT_BRIEF: str = '%(levelname)-8s [%(name)s] %(message)s'

Logging format to use for brief logging.

axonius_api_client.constants.logs.LOG_FMT_CONSOLE: str = '%(levelname)-8s [%(name)s] %(message)s'

default logging format for console logs, will be verbose if package wide debugging is enabled

axonius_api_client.constants.logs.LOG_FMT_FILE: str = '%(asctime)s %(levelname)-8s [%(name)s:%(module)s:%(funcName)s:%(pathname)s:%(lineno)d] %(message)s'

default logging format for file logs

axonius_api_client.constants.logs.LOG_DATEFMT_CONSOLE: str = '%m/%d/%Y %I:%M:%S %p %Z'

default datetime format for console logs

axonius_api_client.constants.logs.LOG_DATEFMT_FILE: str = '%m/%d/%Y %I:%M:%S %p %Z'

default datetime format for file logs

axonius_api_client.constants.logs.LOG_LEVEL_CONSOLE: str = 'debug'

default logging level for console log handlers

axonius_api_client.constants.logs.LOG_LEVEL_FILE: str = 'debug'

default logging level for file log handlers

axonius_api_client.constants.logs.LOG_LEVEL_HTTP: str = 'debug'

default logging level for axonius_api_client.http.Http

axonius_api_client.constants.logs.LOG_LEVEL_AUTH: str = 'debug'

default logging level for axonius_api_client.auth.models.Mixins

axonius_api_client.constants.logs.LOG_LEVEL_API: str = 'debug'

default logging level for axonius_api_client.api.mixins.ModelMixins

axonius_api_client.constants.logs.LOG_LEVEL_WIZARD: str = 'debug'

default logging level for axonius_api_client.api.wizards.wizard.Wizard

axonius_api_client.constants.logs.LOG_LEVEL_PACKAGE: str = 'debug'

default logging level for the entire package

axonius_api_client.constants.logs.LOG_LEVELS_STR: List[str] = ['debug', 'info', 'warning', 'error', 'fatal']

list of valid logging level strs

axonius_api_client.constants.logs.LOG_LEVELS_STR_CSV: str = 'debug, info, warning, error, fatal'

csv of valid logging level strs

axonius_api_client.constants.logs.LOG_LEVELS_INT: List[int] = [10, 20, 30, 40, 50]

list of valid logging level ints

axonius_api_client.constants.logs.LOG_LEVELS_INT_CSV: str = '10, 20, 30, 40, 50'

csv of valid logging level ints

axonius_api_client.constants.logs.LOG_FILE_PATH: str = '/home/docs/checkouts/readthedocs.org/user_builds/axonius-api-client/checkouts/latest/docs'

default path for log files

axonius_api_client.constants.logs.LOG_FILE_PATH_MODE = 448

oct default permissions to use when creating directories

axonius_api_client.constants.logs.LOG_FILE_NAME: str = 'axonius_api_client.log'

default log file name to use

axonius_api_client.constants.logs.LOG_FILE_MAX_MB: int = 5

default rollover trigger in MB

axonius_api_client.constants.logs.LOG_FILE_MAX_FILES: int = 5

default max rollovers to keep

axonius_api_client.constants.logs.LOG_NAME_STDERR: str = 'handler_stderr'

default handler name for STDERR log

axonius_api_client.constants.logs.LOG_NAME_STDOUT: str = 'handler_stdout'

default handler name for STDOUT log

axonius_api_client.constants.logs.LOG_NAME_FILE: str = 'handler_file'

default handler name for file log

axonius_api_client.constants.logs.MAX_BODY_LEN: int = 100

maximum body length to trim when printing request/response bodies

axonius_api_client.constants.logs.RESPONSE_ATTR_MAP: dict = {'cookies': '{cookies}', 'elapsed': '{elapsed}', 'headers': '{headers}', 'method': '{method!r}', 'reason': '{reason!r}', 'size': '{body_size}', 'status': '{status_code!r}', 'url': '{url!r}'}

Mapping of response attributes to log to their formatting strings.

axonius_api_client.constants.logs.REQUEST_ATTR_MAP: dict = {'cookies': '{cookies}', 'headers': '{headers}', 'method': '{method!r}', 'size': '{body_size}', 'url': '{url!r}'}

Mapping of request attributes to log to their formatting strings.

axonius_api_client.constants.logs.RESPONSE_ATTRS: List[str] = ['url', 'size', 'method', 'status', 'reason', 'elapsed', 'headers', 'cookies', 'all']

List of valid response attributes to log.

axonius_api_client.constants.logs.REQUEST_ATTRS: List[str] = ['url', 'size', 'method', 'headers', 'cookies', 'all']

List of valid request attributes to log.

axonius_api_client.constants.logs.RESPONSE_ATTRS_DEFAULT: Tuple[str, ...] = ('url', 'status', 'reason', 'elapsed')

Default response attributes to log.

axonius_api_client.constants.logs.REQUEST_ATTRS_DEFAULT: Tuple[str, ...] = ('url', 'size')

Default request attributes to log.