Open jjanis opened 5 years ago
Hello Jānis,
Thanks for bringing this to my attention, I will fix it when i find some time. In case you have already found a fix for this, i would highly appreciate it if you can create a pull request for it.
Thanks again. Regards, Sankalp
On Tue, Apr 16, 2019, 15:38 Jānis Judvaitis notifications@github.com wrote:
Your code causes double output when used in project where I define my own loggers with logging.DEBUG level.
!/usr/bin/env python3
import logging import coloredlogs from datetime import timedelta from timeloop import Timeloop
logging.basicConfig(level=logging.DEBUG) coloredlogs.install(level=logging.DEBUG) logger = logging.getLogger(name)
looper = Timeloop()
@looper.job(interval=timedelta(seconds=5)) def work(): pass
looper.start(block=True)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sankalpjonn/timeloop/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AQDeazB_9VUFRozSnnu4hij9mer5ELB9ks5vhaEZgaJpZM4cx2x_ .
Having this same issue, has this been resolved?
I solved it this way
# Timeloop has a default logging handler, remove it, so we only use our own handlers (avoids duplicate logs) logging.getLogger('timeloop').handlers.clear()
Your code causes double output when used in project where I define my own loggers with logging.DEBUG level.