Re: PYTHON LOGGING with StreamHandler and FileHandler

2014-11-25 Thread Peter Otten
Ganesh Pal wrote: > Thanks for the hint , I was able to get the error messages on the console > by setting the StreamHandler level to WARNING . > > It works for me know butone LAST question , it might sound simple, > but Iam not able to understand the difference between > > - (a) ch

Re: PYTHON LOGGING with StreamHandler and FileHandler

2014-11-25 Thread Ganesh Pal
Thanks for the hint , I was able to get the error messages on the console by setting the StreamHandler level to WARNING . It works for me know butone LAST question , it might sound simple, but Iam not able to understand the difference between - (a) ch.setLevel(logging.WARNING) and c

Re: PYTHON LOGGING with StreamHandler and FileHandler

2014-11-24 Thread dieter
Ganesh Pal writes: > The below program logs all the messages to the log file and displays the > same on the console . > > Please suggest how do I ensure that error and warning log levels go ONLY to > stdout and/or stder You read the handler related documentation of the logging module. When I rem

PYTHON LOGGING with StreamHandler and FileHandler

2014-11-24 Thread Ganesh Pal
Hi Team, The below program logs all the messages to the log file and displays the same on the console . Please suggest how do I ensure that error and warning log levels go ONLY to stdout and/or stder Code : import logging import sys # StreamHandler root = logging.getLogger() root.setLevel(lo