Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop if added to root handler #1

Open
epa095 opened this issue Aug 24, 2017 · 0 comments
Open

Infinite loop if added to root handler #1

epa095 opened this issue Aug 24, 2017 · 0 comments

Comments

@epa095
Copy link

epa095 commented Aug 24, 2017

If this log handler is attached to the root handler with loglevel DEBUG you will receive the log-messages from the request library and url3lib, again triggering new log messages from those library, resulting in an infinite loop of messages. I come over the same bug when I tried to write my own log-handler, and I have described the issue in more detail on stackoverflow.

How to reproduce:

import logging
import loggly.handlers
mylogger = logging.getLogger()
myhandler = loggly.handlers.HTTPSHandler("YourUrl","POST")
mylogger.addHandler(myhandler)
mylogger.setLevel(logging.DEBUG) 
mylogger.info("message")

You can set YourURL to "http://127.0.0.1:6000" and then use nc -k -l 6000 to see the connections flowing inn (you might need to press enter in the nc window to make it flush its output buffer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant