yahoo-oauth icon indicating copy to clipboard operation
yahoo-oauth copied to clipboard

Provide a way to enable or disable logging

Open josuebrunel opened this issue 9 years ago • 4 comments

josuebrunel avatar Jun 17 '15 13:06 josuebrunel

(unless the propagate flag for a logger is set to a false value, at which point the passing to ancestor handlers stops).

I think you should look at the logger's propagate flag.

LeMeteore avatar Jul 21 '15 23:07 LeMeteore

Thanks @LeMeteore , i will try this out and keep you posted :wink:

josuebrunel avatar Jul 22 '15 06:07 josuebrunel

I think this isn't fully resolved. After a lot of testing, this is the only way I could disable yahoo-oauth messing with my own logger:

import logging
logger = logging.getLogger('my-own-logger')
logger.propagate = False

# Disable yahoo-oauth formatter and logger
logging.setLoggerClass(logging.Logger)

I think yahoo-oauth should't set its own logger class unless specified (maybe some option before importing?)

underdpt avatar Dec 22 '15 16:12 underdpt

@underdpt hello. I will dig into that this weekend. Don't hesitate to propose a patch by the way.

josuebrunel avatar Dec 22 '15 19:12 josuebrunel

@josuebrunel I've opened #61 to address this

DMcP89 avatar Apr 24 '24 04:04 DMcP89