@
@
@chistya2018-02-07 18:58:45
Python
@chistya, 2018-02-07 18:58:45

How to change event time using logging and SysLogHandler in python?

Good afternoon.
Can you tell me how you can change the event time using the logging module and SysLogHandler in python 3?
When passing the extra parameter as a dictionary with asctime or created keys, it gives an error:

KeyError: "Attempt to overwrite 'created' in LogRecord"
Do I understand correctly that I have to override some class or class method?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Pugachev, 2018-02-08
@Stqs

no need to do this
syslog has a certain structure for a reason
many tools (for example, for collecting metrics and actually logs) can automatically parse such files precisely because the format of these logs is standardized

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question