Delgan

Results 639 comments of Delgan

This is a problem with `pytest` or `pytest-xidst`. In the code you shared, the `format` of the `logger` does not contain any color. Therefore, Loguru should not affect the colors...

Haha, thanks for the feedback @netgoatfr! I'm glad Loguru is working well for you and that you like it! Your kind words are appreciated. :D

As indicated in the `RuntimeError` exception, this problems occurs because Loguru's logging methods were somehow recursively called. The logs you shared seems to indicate the issue originated from a Gunicorn...

@jprmartinho Sorry for not answering sooner, but glad you figured it out. It's quite unfortunate, but yes, indirectly using the `logger` within a sink can cause this surprising error.

@arihans You need to identify **where** the `logger` is being called recursively, and change your code to avoid that. The stack trace of the error could help. Feel free to...

Hi @shlomi93. As indicated by @smuglik (thanks), the `colorize=True` makes little sense with log files. This is because the colored logs on your terminal are implemented using [ANSI escape sequences](https://en.wikipedia.org/wiki/ANSI_escape_code),...

Hello. The `StrRecord` class is an internal type that should not be imported. If your intention was to use type hints, you should instead use the `Message` type to annotate...

Hi @fellnerse. Can you please clarify why you need these types available at runtime? The stub files are pretty standard, most popular type checkers should be aware of them. Is...

The colors aren't publicly customizable. You need to use a third-party library in your `formatter` function, such as [`better_exceptions`](https://github.com/Qix-/better-exceptions/tree/master) for example.

This is likely due to FastAPI restarting the whole application each time a worker is spawned. This causes `logger.add()` to be called multiple times, and different files to be created.