Delgan
Delgan
You can use a custom `filter` function: ```python logger.add(sys.stderr, filter=lambda record: record["level"].name == "DEBUG") ```
@AaronWaxson Actually, I do consider this to be a good practice of logging, so I prefer not to. :grin: It's better in my opinion to have a minimum threshold level,...
Hi @luisazevedo-mb. I'm not sure it work but what about [using `InterceptHandler` or `PropagateHandler`](https://github.com/Delgan/loguru#entirely-compatible-with-standard-logging) (depending on your goal) to integrate Loguru with standard logging module? Otherwise you may need to...
Hey @taranlu-houzz. By default the `logger` send messages using regular `sys.stderr.write()` method. As you realized, this causes compatibility problems with Rich's progressive bars. Both solutions you thought of should work....
Indeed, it seems that you need to generate the table as a `str` that can be passed to the logger. See this question: https://github.com/willmcgugan/rich/issues/192 ```python from rich.console import Console from...
Hi @taranlu-houzz. Can you please share a small example to reproduce the problem? How are you redirecting the output? Adding a specific file handler should get rid of the ansi...
Thanks for the code snippets @taranlu-houzz! The color codes are added due to `colorize=True`. As you realized, this works fine when logs are printed to the console but not when...
@stevezau I don't this is easily doable. You may need to implement your own sink writing to `sys.stderr` using [ANSI escape code](https://en.wikipedia.org/wiki/ANSI_escape_code) to put the cursor back at the beginning...
Hi! Well, you can disable formatting by not providing any argument. If you want some arguments to be added to the `extra` dict, you can use `bind()` instead: ```python logger.bind(additional_infos=kwargs).info(f"Is...
I may have some ideas to allow more freedom in configuring the message formatting. I think this feature might be of interest to some people, in your case and others....