Browse Source

Logging

pull/152/head
Jure Šorn 1 year ago
parent
commit
fcb8df8e55
2 changed files with 2 additions and 3 deletions
  1. 3
      README.md
  2. 2
      index.html

3
README.md

@ -2449,7 +2449,6 @@ if __name__ == '__main__':
Logging
-------
```python
import logging
```
@ -2468,7 +2467,7 @@ logging.basicConfig(
filename=None, # Logs to console by default.
format='%(levelname)s:%(name)s:%(message)s', # Add `%(asctime)s` for datetime.
level=logging.WARNING, # Drops messages with lower priority.
handlers=[logging.StreamHandler()] # [FileHandler(filename)] if filename is set.
handlers=[logging.StreamHandler()] # Uses FileHandler if filename is set.
)
```

2
index.html

@ -2022,7 +2022,7 @@ logging.debug/info/warning/error/critical(&lt;str&gt;) <span class="hljs-commen
filename=<span class="hljs-keyword">None</span>, <span class="hljs-comment"># Logs to console by default.</span>
format=<span class="hljs-string">'%(levelname)s:%(name)s:%(message)s'</span>, <span class="hljs-comment"># Add `%(asctime)s` for datetime.</span>
level=logging.WARNING, <span class="hljs-comment"># Drops messages with lower priority.</span>
handlers=[logging.StreamHandler()] <span class="hljs-comment"># [FileHandler(filename)] if filename is set.</span>
handlers=[logging.StreamHandler()] <span class="hljs-comment"># FileHandler(filename) if filename is set.</span>
)
</code></pre></div>

Loading…
Cancel
Save