-
Notifications
You must be signed in to change notification settings - Fork 718
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
Asynchronous bug #232
Comments
Hi. Could you please show me the part of your code where you |
Hi, I tried with both commenting and uncommenting the enqueue parameter, but nothing changed
Instead, my code is as follows. I omitted some parts, but the essential is here. Also, the logging file is a module with an init.py that import from the file where the logger above is declared.
|
Thanks for the code. 👍 Unfortunately, it's hard to help you without being able to reproduce the bug. Is there any way you could try to reduce your code to a minimal reproducible example, so I can investigate what is going wrong? I guess Uvicorn is internally using |
Basically, it's a fastAPI app with a module having the logger instantiation and an init file that exposes it (from which I import the logger). Apart from that, there's nothing special going on in my app. No, I don't use |
No, you don't have to use I guess if |
The log file with the error is reported below. With
|
The Anyway, I don't see anything related to Loguru in the traceback of your exception. 😕 Unfortunately, without being able to reproduce the error and without seeing the full traceback, I can't guess what's going wrong. If it is not possible to have more information, I will conclude that it is not a bug related to Loguru. 😬 |
Don't worry, now it's logging (despite being somehow slow). The problem may be below Loguru, i.e. some dependencies. If I find the problem, I'll provide a sample config for using the library with async/await (so that other people don't make my same mistake). Shall I add it in the docs? |
Well, if you figure out anything that could help investigate this issue further, please let us know! At that time, we will decide if we need to update the documentation or if there is a bug that needs to be fixed. |
Hi,
I'm using an async web framework with loguru. The framework runs in a single process, so there should not be any race condition. Though, when logging, I get the following error
Is there a simple workaround to this issue? I'm using Ubuntu and the problem is different from #108 and #171 (although I tried to await logger.complete and did not change the situation).
Thanks.
Here's also part of the logged exception. I couldn't post it all due to sensitive content
The text was updated successfully, but these errors were encountered: