Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: How to use logging Date: Mon, 17 Feb 2014 19:16:13 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 23 Message-ID: References: <5a53c1ca-1104-40f2-9401-a6d3b3673ede@googlegroups.com> NNTP-Posting-Host: panix1.panix.com X-Trace: reader1.panix.com 1392664573 5097 166.84.1.1 (17 Feb 2014 19:16:13 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 17 Feb 2014 19:16:13 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:66620 In <5a53c1ca-1104-40f2-9401-a6d3b3673ede@googlegroups.com> kumar 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@panix.com watch 'House', or a real serial killer to watch 'Dexter'.