Log¶
Trustar SDK contains a log module, shares almost the same interface as the standard logging module, except for the getLogger that has been changed to get_logger
from trustar import log
logger = log.get_logger()
logger.info("Log something useful")
It outputs data in json format and the logging level can be modified by creating an environmental variable:
export TRUSTAR_LOGGING_LEVEL=LEVEL
Where LEVEL has to be an int with the following meaning:
LEVEL INTEGER CRITICAL 50 ERROR 40 WARNING 30 INFO 20 DEBUG 10 NOTSET 0