Issue 18824: Adding LogRecord attribute "traceback" (original) (raw)

Issue18824

Created on 2013-08-24 11:16 by deleted250130, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg196072 - (view) Author: (deleted250130) Date: 2013-08-24 11:16
On configuring a logger with logging.basicConfig() and using logging.exception() the traceback is always written implicitly to the end. This makes it not possible to create a formation that writes something beyond the traceback. For example it could be something like that: logging.basicConfig(filename = '/tmp/python.log', format = '%(asctime)s\n%(traceback)s\nSome_text_or_LogRecords_after_the_traceback', datefmt = '%Y-%m-%d %H:%M:%S')
msg197694 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-09-14 07:27
basicConfig() is for simple usage only. You can use a custom Formatter subclass to meet your specific requirements.
History
Date User Action Args
2022-04-11 14:57:50 admin set github: 63024
2013-09-14 07:27:43 vinay.sajip set status: open -> closednosy: + vinay.sajipmessages: + resolution: not a bug
2013-08-24 11:16:56 deleted250130 create