IOStream writes to the root logger #630

Open
pitrou opened this Issue Nov 12, 2012 · 6 comments

Projects

None yet

3 participants

@pitrou

IOStream is sprinkled with calls such as logging.warning(...). Instead, each IOStream should be configurable to use a dedicated Logger object.

@bdarnell
tornadoweb member

This has been moved off the root logger in the master branch (http://tornado.readthedocs.org/en/latest/log.html). Per-IOStream logging is an interesting idea though...

@pitrou

It sounds like it would be simple enough to add a set_logger() method to set the logger object to something else than the default. Then the user has full control on how they want that IOStream's logging to be handled.

@bdarnell
tornadoweb member

There's one additional subtlety in that the IOStream (and many other tornado-internal classes) use two loggers: one for internally-generated messages (including things like network errors) and one for things like uncaught exceptions from user callbacks. Which would set_logger replace? (or it could replace both, or leave both in place and add a third channel)

@pitrou

Which would set_logger replace? (or it could replace both, or leave both in place and add a third channel)

Replacing both is sufficient IMO.

@brainsik

Any ETA on when the next version of Tornado will be released? Really looking forward to having logs off the root logger.

Thanks!

@bdarnell
tornadoweb member

No definite ETA, but it's getting close.

@bdarnell bdarnell added the log label Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment