Delgan

Results 597 comments of Delgan

> when will logger instance release file handle? You can [`remove()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.remove) the added handler, it should release the file handle. Let me know if that solve your issue.

This is due to log not being **de**serializable. The serialization process sending the message to the queue works fine, but at the time it needs to be retrieved and logged...

Hi. You can probably use `logger_b = copy.deepcopy(logger_a)`. See more in depth explanations in the documentation: [Creating independent loggers with separate set of handlers](https://loguru.readthedocs.io/en/stable/resources/recipes.html#creating-independent-loggers-with-separate-set-of-handlers).

This is something I could consider. Do you mind elaborating your use case please? What do you need that cannot be done with `bind()` and a `filter`, as shown in...

Thanks. Your use case is definitely not compatible with the `binder()` / `filter` workaround. That's why there was the `copy.deepcopy()` solution. However, as you mentioned, this is not very convenient...

In the meantime you can probably add `base_logger = copy.deepcopy(logger)` at the very beginning of your application and later use `logger_b = copy.deepcopy(base_logger)` before starting your worker. That's way, the...

Yeah, keep using `logger` as usual. However, when you need to create a new independent handler, do the following: ```python logger_a = copy.deepcopy(base_logger) logger_a.add("specific.log") ```

I hadn't thought about it but I think you are right. It's better to limit the number of files open at the same time, because the OS can put a...

Hi. There is documentation about the caveats and possible missuses of `multiprocessing` with `loguru` here: [Compatibility with `multiprocessing` using `enqueue` argument](https://loguru.readthedocs.io/en/stable/resources/recipes.html#compatibility-with-multiprocessing-using-enqueue-argument) Does it help you a bit? The `enqueue=True` argument...

Hi @MatthewScholefield. Sorry for replying so late. This seems to be a very interesting idea. I remember at some point I was also looking for a way to prevent excessive...