File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,19 +115,17 @@ The level is configured as `INFO` because the default level is `WARNING`.
115115For a persistent log, the logger can be configured to write to a file, like so:
116116
117117``` python
118-
119118>> > import logging
120119...
121- ... # configures the output file name to example.log, and the minimum logging level as INFO
122- ... logging.basicConfig(filename = ' example.log' , level = logging.INFO )
120+ >> > # configures the output file name to example.log, and the minimum logging level as INFO
121+ >> > logging.basicConfig(filename = ' example.log' , level = logging.INFO )
123122...
124123... def halve_and_quadruple (num ):
125124... # prints INFO:root: num == 5 to the example.log file
126125... logging.info(f " num == { num} " )
127126... return (num // 2 ) * 4
128127...
129128>> > print (halve_and_quadruple(5 ))
130-
131129```
132130
133131## assert
You can’t perform that action at this time.
0 commit comments