This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrewsuttle56
Recipients andrewsuttle56
Date 2021-09-05.15:53:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630857198.47.0.486193642329.issue45106@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-09-05 15:53:18andrewsuttle56setrecipients: + andrewsuttle56
2021-09-05 15:53:18andrewsuttle56setmessageid: <1630857198.47.0.486193642329.issue45106@roundup.psfhosted.org>
2021-09-05 15:53:18andrewsuttle56linkissue45106 messages
2021-09-05 15:53:18andrewsuttle56create