Skip to content
Snippets Groups Projects
Commit 03abc120 authored by Dominik Zobel's avatar Dominik Zobel
Browse files

Reformat logging example code

parent 61e0d2bc
No related branches found
No related tags found
1 merge request!56Debugging Strategies lecture notes
...@@ -242,8 +242,9 @@ _Make debugging easier with proper logging_ ...@@ -242,8 +242,9 @@ _Make debugging easier with proper logging_
```Python ```Python
import logging import logging
logging.basicConfig(filename='output.log', level=logging.WARNING, datefmt='%H:%M:%S', logging.basicConfig(filename='output.log', level=logging.WARNING,
format='[%(asctime)s] %(levelname)-8s in %(pathname)s:%(lineno)d %(message)s') datefmt='%H:%M:%S', format='[%(asctime)s] %(levelname)-8s in ' \
+ '%(pathname)s:%(lineno)d %(message)s')
logging.warning('Example warning message') logging.warning('Example warning message')
logging.error('Example error message') logging.error('Example error message')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment