Delgan
Delgan
@liz-zither Ok, my bad. The `ratelimiter` library is definitely not designed for this use case. Sorry, I didn't look into the details. Here is another example using a custom class:...
How is configured the `logger`? What are the parameters and sinks passed to `logger.add()`? You can specify `colorize=False` and I guess it will fix your issue. As it is, it's...
Thanks for the details. It seems that `colarama` and by extension `loguru` detects `stderr` as supporting the Windows API for colors, while it is not the case. It seems to...
Thanks for the details. I would like to fix that, but unfortunately I'm unable to reproduce the error. I no longer think this is an false positive of Windows API...
Hi. The `format` is configured in the handler. You probably need to use a custom function to differentiate between bound and default `logger`. ```python def formatter(record): if "i" in record["extra"]:...
Thanks for the clarification. Currently, there is no easy way to achieve this. A possible workaround is to create a small utility function, although I agree this is not very...
I just came to realization that you can use [`patch()`](https://loguru.readthedocs.io/en/stable/api/logger.html?#loguru._logger.Logger.patch) also. ```python context_logger = logger.patch(lambda r: r.update(message=r["message"] + f" with param={param}")) context_logger.info("Start") context_logger.info("Something") context_logger.info("Something else") context_logger.info("End") ``` Be aware not...
Hi @cestes. You're not the first one encountering difficulties mixing `loguru` with `gunicorn`, unfortunately. :( Typically, multiple log files instead of one indicates an issue with `multiprocessing`. For example, looking...
Well, you are indirectly calling `logger.add()` in the `if __name__ == '__main__'` block as it's part of your `main()` function. So, moving `logger.add()` around would not change anything. I think...
@cestes Did that fix your problem? Can I close this issue?