K
K
krinbin2021-11-12 22:16:06
Python
krinbin, 2021-11-12 22:16:06

How to setup python logger to write LEVEL to different files?

Hello.
How to configure logger to write different events to different logs?
Everything that was written with ERROR in error.log, but what about INFO in info.log?
At the moment, I have it in error - it writes error, but info and error go to info.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-11-13
@krinbin

you need to make a custom filter .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question