Last active
September 26, 2021 20:40
-
-
Save Rotzke/7e36c740ab4599f69bad6b040993464b to your computer and use it in GitHub Desktop.
Logging module config
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
# stdout | |
logging.basicConfig(format='[%(asctime)s] %(levelname)s: %(message)s', | |
level=logging.INFO, datefmt='%Y/%m/%dT%H:%M:%S') | |
# file | |
logging.basicConfig(filename="log", | |
filemode='a', | |
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', | |
datefmt='%H:%M:%S', | |
level=logging.DEBUG) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment