-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
featureRequest for adding a new featureRequest for adding a new feature
Description
Thanks for this awesome library.
I would like to set the parent logger globally in a child process (spawn method) so I don't have to do that within all my modules like I saw in this example: loguru multiprocess.
The only way I found is by using the code below but I think this is not recommended since _core is not in the public api:
Module A:
from loguru import logger
...
def entrypoint_child_process(self, logger_):
logger._core = logger_._core
Module B:
from loguru import logger
...
def child_job(self):
logger.info("test")What could be the solution in order to set the arg logger_ globally in the child process so I don't have to do the trick describe in your documentation in each module ?
UPDATE:
Maybe this could be accepted ?
logger.__dict__ = logger_.__dict__.copy()Metadata
Metadata
Assignees
Labels
featureRequest for adding a new featureRequest for adding a new feature