Created
November 5, 2023 11:22
-
-
Save Miron-Anosov/65bf7f7cabd39ddd00ba8c1fe8a5999f to your computer and use it in GitHub Desktop.
first_dict_config_for_logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dict_config_log: dict = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'base': { | |
'format': '{"time" : "%(asctime)s", "level" : "%(levelname)s", "message" : %(message)s}' | |
} | |
}, | |
'handlers': { | |
'console': { | |
'class': 'logging.StreamHandler', | |
'level': 'DEBUG', | |
'formatter': 'base' | |
}, | |
'file': { | |
'class': 'logging.FileHandler', | |
'level': 'DEBUG', | |
'formatter': 'base', | |
'filename': 'log.log', | |
'mode': 'a' | |
} | |
}, | |
'loggers': { | |
'first_log': { | |
'level': 'DEBUG', | |
'handlers': ['file', 'console'] | |
} | |
}, | |
# 'filters' : {}, | |
# 'root' : {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment