Created
July 8, 2020 02:22
-
-
Save binshengliu/40c9c8c68811294871a5513f18ebbb29 to your computer and use it in GitHub Desktop.
Setup a basic logger to lot INFO to stderr
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
logging.basicConfig( | |
level=logging.INFO, | |
stream=sys.stderr, | |
format="[%(asctime)s][%(levelname)s] - %(message)s", | |
) | |
log = logging.getLogger(__name__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment