0

How to log to text file and then print it's contents

I want to log to a file then read/print that log https://code.sololearn.com/cdvCSvQTe9TP/?ref=app

28th Aug 2019, 4:15 PM
David Nierman
David Nierman - avatar
7 ответов
28th Aug 2019, 5:45 PM
portpass
+ 1
David Nierman the same error. For WARNING level you should use level=logging.WARNING (in UPPER CASE!)
28th Aug 2019, 5:44 PM
portpass
+ 1
David Nierman Set level=logging.DEBUG and it will do. https://code.sololearn.com/cz4sQrvsGtXv/?ref=app
28th Aug 2019, 6:17 PM
portpass
0
David Nierman You have an error in level=logging.info. Use level=logging.INFO instead.
28th Aug 2019, 4:26 PM
portpass
0
portpass I changed it, but now receiving int object not callable error
28th Aug 2019, 4:32 PM
David Nierman
David Nierman - avatar
0
Figures it out. Debug() and info() do not get logged because the module only logs messages with severity level warning or above
28th Aug 2019, 5:49 PM
David Nierman
David Nierman - avatar
0
Ahh perfect thank you portpass
28th Aug 2019, 6:50 PM
David Nierman
David Nierman - avatar