Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b032d8

Browse files
committed
Logging
1 parent c1de05b commit 5b032d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ logging.debug/info/warning/error/critical(<str>) # Logs to the root logger.
24662466
```python
24672467
logging.basicConfig(
24682468
filename=None, # Logs to console (stderr) by default.
2469-
format='%(levelname)s:%(name)s:%(message)s', # Add `%(asctime)s` for local datetime.
2469+
format='%(levelname)s:%(name)s:%(message)s', # Add '%(asctime)s' for local datetime.
24702470
level=logging.WARNING, # Drops messages with lower priority.
24712471
handlers=[logging.StreamHandler(sys.stderr)] # Uses FileHandler if filename is set.
24722472
)

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
20162016
</code></pre>
20172017
<div><h3 id="setup">Setup</h3><pre><code class="python language-python hljs">logging.basicConfig(
20182018
filename=<span class="hljs-keyword">None</span>, <span class="hljs-comment"># Logs to console (stderr) by default.</span>
2019-
format=<span class="hljs-string">'%(levelname)s:%(name)s:%(message)s'</span>, <span class="hljs-comment"># Add `%(asctime)s` for local datetime.</span>
2019+
format=<span class="hljs-string">'%(levelname)s:%(name)s:%(message)s'</span>, <span class="hljs-comment"># Add '%(asctime)s' for local datetime.</span>
20202020
level=logging.WARNING, <span class="hljs-comment"># Drops messages with lower priority.</span>
20212021
handlers=[logging.StreamHandler(sys.stderr)] <span class="hljs-comment"># Uses FileHandler if filename is set.</span>
20222022
)

0 commit comments

Comments
 (0)