anuradha.raghupathy2...@gmail.com wrote:

> Hi,
> 
> Below is the python code that I have. I want to redirect the output to my
> C drive..myapp.log.
> 
> I am editing and creating scripts in IDLE and running it as a python shell
> or module.
> 
> Can you help?
> 
> import logging
> 
> def main():
>    logging.basicConfig(Filename='c://myapp.log', level=logging.ERROR)

Python is case-sensitive. Try:

     logging.basicConfig(filename='c://myapp.log', level=logging.ERROR)

>    logging.debug('started debug')
>    logging.info('info printing')
>    logging.warning('test warning')
>    logging.debug('debug again')
>    logging.error('Error')
> 
> if __name__ == '__main__':
>    main()


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to