How to use logging

John Gordon gordon at panix.com
Mon Feb 17 20:16:13 CET 2014


In <5a53c1ca-1104-40f2-9401-a6d3b3673ede at googlegroups.com> kumar <arun.achutha at gmail.com> writes:

> Hi folks,

> i'm new to python i understood the logging mechanism but unable to
> understand how these are applied in real time examples can any body help
> me out

Here are some very simple examples:

    import logging

    logging.info('This message will be logged at the INFO level.')
    logging.error('This message will be logged at the ERROR level.')
    logging.debug('This message will be logged at the DEBUG level.')

Did you need help with some specific aspect of logging, like sending the
output to a file instead of the default destination?

-- 
John Gordon         Imagine what it must be like for a real medical doctor to
gordon at panix.com    watch 'House', or a real serial killer to watch 'Dexter'.




More information about the Python-list mailing list