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

Skip to content

Commit 1cf1d14

Browse files
committed
Fixed log level
1 parent c2fee9b commit 1cf1d14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Notes/08_Testing_debugging/02_Logging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ You will notice that you don't see the output from the `log.debug()`
269269
operation. Type this to change the level.
270270

271271
```
272-
>>> logging.getLogger('fileparse').level = logging.DEBUG
272+
>>> logging.getLogger('fileparse').setLevel(logging.DEBUG)
273273
>>> a = report.read_portfolio('Data/missing.csv')
274274
WARNING:fileparse:Row 4: Bad row: ['MSFT', '', '51.23']
275275
DEBUG:fileparse:Row 4: Reason: invalid literal for int() with base 10: ''
@@ -281,7 +281,7 @@ DEBUG:fileparse:Row 7: Reason: invalid literal for int() with base 10: ''
281281
Turn off all, but the most critical logging messages:
282282

283283
```
284-
>>> logging.getLogger('fileparse').level=logging.CRITICAL
284+
>>> logging.getLogger('fileparse').setLevel(logging.CRITICAL)
285285
>>> a = report.read_portfolio('Data/missing.csv')
286286
>>>
287287
```

0 commit comments

Comments
 (0)