-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"FileNotFoundError" during montlhy rotation with compression #220
Comments
Hey @ns-kyuan, can you please tell me which Loguru version you are using ( |
Thanks for the reply, the version I am using is 0.4.1 |
Ok, it looks like a bug then... 😬 Do you have the same error if you try to rotate "hourly" and not "montlhy"? Are you using threads maybe? |
I did not try the hourly rotation. |
Hum... This might be related to Where are you configuring the Basically, it seems multiple processes are trying to write logs to the same file. Rotation is not happening exactly at the same time, so when the first one close and compress the file, a conflict may happen if a second process try to write later on the removed file. |
No, I only call
And the problem actually did not just happen at the moment entering March, it kept lasting and even the workers created on March 2nd had the same exception. |
Ok, I will double-check the rotation source code but I think your problem is related to I don't know exactly how is working Kafka and how it is managing workers. Is there any possibility that you create a minimal reproducible example or that you share your code with me? It's hard to tell without seeing all the configuration steps. |
results
|
Thanks! Multiple processes using the You should try to add your handlers with the |
Thanks for your response. Let me try that and get back to you! |
It works! |
Great! 🎉 I'm closing this issue then, don't hesitate to ask me if you have other problems. 😉 |
Hi @Delgan ,
I have a similar problem. My handler is like this,
and my program encountered the following exception when entering March
It seems that Feb's log was properly rotated out and compressed while the program still wanted to write to it. Is there a way to fix this?
Thank you!
Originally posted by @ns-kyuan in #213 (comment)
The text was updated successfully, but these errors were encountered: