How to use logging

K

kumar

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
 
M

Mark Lawrence

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

Start here http://docs.python.org/3/howto/logging.html, if that's not
good enough please come back with a more detailed question, I'm certain
that someone will be able to help you.

Slight aside you appear to be using google groups. If that is the case
would you read and action this
https://wiki.python.org/moin/GoogleGroupsPython to prevent the problems
that gg causes. if not sorry about the noise :)
 
J

John Gordon

In said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top