I tried to switch from the Python standard logging to loguru. But I will need to do more work to complete it. I am working on the branch loguru.
The loguru readme shows how to send logging messages to loguru sinks. In nextline, this method doesn't correctly show the location of logging messages created in spawned processes. The locations all become nextline.utils.multiprocessing_logging:95, which is where nextline collects logging messages created in spawned processes.
loguru doesn't read the locations from the log records. It determines the locations from the frames in the main process.
On the other hand, loguru does support multiprocessing.. But it doesn't collect logging messages in the main process. It processes logging messages in each sub-process.
Consequently, to use loguru in nextline, we need to disable MultiprocessingLogging and use InterceptHandler in each spawned process.
I tried to switch from the Python standard logging to loguru. But I will need to do more work to complete it. I am working on the branch loguru.
The loguru readme shows how to send logging messages to loguru sinks. In nextline, this method doesn't correctly show the location of logging messages created in spawned processes. The locations all become
nextline.utils.multiprocessing_logging:95, which is where nextline collects logging messages created in spawned processes.loguru doesn't read the locations from the log records. It determines the locations from the frames in the main process.
On the other hand, loguru does support multiprocessing.. But it doesn't collect logging messages in the main process. It processes logging messages in each sub-process.
Consequently, to use loguru in nextline, we need to disable
MultiprocessingLoggingand useInterceptHandlerin each spawned process.