Delgan / loguru

Python logging made (stupidly) simple
MIT License
18.69k stars 682 forks source link

loguru is outputting all file logs to stdout #1144

Closed arsalan86 closed 1 month ago

arsalan86 commented 1 month ago

I'm using loguru in a module, and I .remove() the predefined logger before I add my own:

logger.add(".logs/lastrun.log", level="DEBUG", rotation=rotate_once(), format=format)

rotate_once() returns a callable that will only return true once and then always return false.

Any debug messages I send through the logger.debug() also get output to stdout, which I explicitly don't want.

I've checked my configs, environment variables, everything I can think of, but I can't seem to trace this issue. What am I missing?

arsalan86 commented 1 month ago

I found the issue: I was using the wrong [dev] branch for a git submodule, and the code in that submodule was adding a trace level logger to stdout.

This issue is unrelated to loguru, so I'm going to close it.