Delgan

Results 592 comments of Delgan

Hi. Basically, your log message is formatted twice: once by Loguru then by the Rich handler. Both add the traceback to the formatted message, which is why you see it...

Thanks for your PR @CollinHeist. Apologies for the delay. Admittedly, I was initially rather reluctant to add such a feature, for the sake of simplicity. Though, I agree that this...

The `level` parameter is a **minimum** threshold. This is the conventional and recommended way of doing logging: you can adapts the logged details according to your needs during development or...

This happens because of `enqueue=True`. Your program terminates while some messages are still pending in the internal queue and not yet logged. Normally, Loguru calls `logger.remove()` before terminating the program...

I don't know about Databricks, if the file could not be created, an error should be raised. Do you see file created when using `open()` built-in? Because Loguru is doing...

Can you merge these filters into one unique function?

More like this: ```python def _level_filter(record, level): return record["level"].name == level def _logger_filter(record): record['transaction_id'] = f"{client_addr_var.get()}" return record['transaction_id'] def make_filter(level): def my_filter(record): return _level_filter(record, level) and _logger_filter(record) return my_filter logger.remove()...

> request id use > with logger.contextualize(request_id=transaction_id)? Sorry, I'm not sure to understand your question. Can you elaborate please?

I can hardly give you an answer without seeing your code. You can try using `logger.contextualize()`, usually it helps with this use case.