LyCORIS icon indicating copy to clipboard operation
LyCORIS copied to clipboard

Logging best practice suggestion

Open Jannchie opened this issue 8 months ago • 0 comments

Thank you for this useful library!

I noticed that the library configures logging internally by setting logger level/handlers inside the module. While this may help with development or debugging, it can cause unintended side effects for users who import this library. Specifically, it can override the logging configuration of downstream applications or libraries, leading to unexpected log outputs.

For me, I want to set the log level and output style for LyCORIS before my training script imports the package. However, currently I have to override the default handler and log level after importing the package.

If needed, I would be happy to submit a pull request to help with this.

Thanks again!

reference: https://docs.python.org/3.13/howto/logging.html#configuring-logging-for-a-library

Jannchie avatar May 02 '25 07:05 Jannchie