Hi rezn,
Unless I misunderstand your question, logging is not specific to
tornado. I just use the standard python logging module. This may be a
bit of over-kill for a simple example but you can check out my python
app, which does use Tornado in parts:
https://bitbucket.org/silverbucket/belvedere/src
The key part is in bin/belvedere_daemon.py where logging is set up:
(line 25):
logging.basicConfig(format='[%(levelname)s] %(asctime)s [%(thread)d]
%(filename)s %(funcName)s[%(lineno)d]: %(message)s',datefmt='%d-%m-%Y
%H:%M:%S',filename=settings.LOG_DIR,level=logging.INFO)
The config is based straight off the python logging docmentation.
You can see the logging in action throughout the code, especially in
the notify/listener.py
Hope this helps!
-Nick
On Tue, Sep 11, 2012 at 11:20 PM, rezn8 <
jason.c...@gmail.com> wrote:
> I've tried everything under the sun to get logging to work on tornado 2.4
> but I can't see to get it to work. It appears to me that it's suppressed
> somehow. I've googled examples but couldn't come across one that worked.
> Would it be possible to see a simple example with logging enabled?