-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed endless sleep bug
- Loading branch information
Showing
4 changed files
with
72 additions
and
52 deletions.
There are no files selected for viewing
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import logging | ||
|
||
# set up logging to file - see previous section for more details | ||
logging.basicConfig(level=logging.DEBUG, | ||
format='%(message)s', | ||
filename='./logs/output.log', | ||
filemode='w') | ||
# define a Handler which writes INFO messages or higher to the sys.stderr | ||
console = logging.StreamHandler() | ||
console.setLevel(logging.INFO) | ||
# set a format which is simpler for console use | ||
formatter = logging.Formatter('%(message)s') | ||
# tell the handler to use this format | ||
console.setFormatter(formatter) | ||
# add the handler to the root logger | ||
logging.getLogger('').addHandler(console) | ||
|
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