Created
August 24, 2017 04:05
-
-
Save pisceanfoot/28b99ca69dafbce727d13239d7f98522 to your computer and use it in GitHub Desktop.
display log in console for lettuce
This file contains hidden or 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
import logging | |
import sys | |
root = logging.getLogger() | |
root.setLevel(logging.INFO) | |
ch = logging.StreamHandler(sys.stdout) | |
ch.setLevel(logging.INFO) | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
ch.setFormatter(formatter) | |
root.addHandler(ch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment