STIXCore util#

The util submodule contains general purpose code or code that doesn’t belong anywhere else specifically.

stixcore.util Package#

stixcore.util.logging Module#

The logging module provides a common logging using pythons logging module. A root logger is configured for the stixcore package on import and all subsequent loggers should be created as children of the logger.

Examples

#stixcore.mymodule (stixcore/mymodule.py)
import logging
from stixcore.util.logging import get_logger

logger = get_logger(__name__)
logger.debug('you will not see me')
logger = get_logger(__name__, level=logging.DEBUG)
logger.debug('you will see me')

2020-11-25T12:21:27Z DEBUG: you will see me - stixcore.mymodule

Functions#

get_logger(name[, level])

Return a configured logger instance.