[New-bugs-announce] [issue45106] Issue formating for log on Linux machines
Andrew Suttle
report at bugs.python.org
Sun Sep 5 11:53:18 EDT 2021
New submission from Andrew Suttle <andrewsuttle56 at gmail.com>:
Using the format option for Python logging works fine on all windows machines:
logging.basicConfig(filename='log.log', encoding='utf-8', level=logging.DEBUG,format='%(asctime)s : %(message)s ')
But error occurs on Linux mint 64 20.2 using Python 3.8 when the % symbol in the format causes a problem.
Traceback (most recent call last):
File "/usr/lib/python3.8/idlelib/run.py", line 559, in runcode
exec(code, self.locals)
File "/media/victor/B694-5211/python now git/prototype server3.py", line 14, in
logging.basicConfig(filename='log.log', encoding='utf-8', level=logging.DEBUG,format='%(asctime)s:%(message)s')
File "/usr/lib/python3.8/logging/init.py", line 2009, in basicConfig
raise ValueError('Unrecognised argument(s): %s' % keys)
ValueError: Unrecognised argument(s): encoding
----------
files: program.txt
messages: 401089
nosy: andrewsuttle56
priority: normal
severity: normal
status: open
title: Issue formating for log on Linux machines
type: compile error
versions: Python 3.8
Added file: https://bugs.python.org/file50261/program.txt
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45106>
_______________________________________
More information about the New-bugs-announce
mailing list