Re: Multiple log files using logging module

2019-03-24 Thread Luuk
On 24-3-2019 19:33, Peter Otten wrote: Luuk wrote: On 24-3-2019 18:13, Sharan Basappa wrote: I have a test program that imports a design program. Both the programs need to log messages. I have tried the following: 1) Both the programs have the following lines: for handler in logging.root.han

Re: Multiple log files using logging module

2019-03-24 Thread Peter Otten
Luuk wrote: > On 24-3-2019 18:13, Sharan Basappa wrote: >> I have a test program that imports a design program. >> Both the programs need to log messages. >> >> I have tried the following: >> >> 1) Both the programs have the following lines: >> for handler in logging.root.handlers[:]: >> lo

Re: Multiple log files using logging module

2019-03-24 Thread DL Neil
On 25/03/19 6:13 AM, Sharan Basappa wrote: I have a test program that imports a design program. Both the programs need to log messages. ...> I would like to get comment from members here as well as some simple programs to illustrate this ... Have you copied this code from somewhere? Which tu

Re: Multiple log files using logging module

2019-03-24 Thread Luuk
On 24-3-2019 18:13, Sharan Basappa wrote: I have a test program that imports a design program. Both the programs need to log messages. I have tried the following: 1) Both the programs have the following lines: for handler in logging.root.handlers[:]: logging.root.removeHandler(handler)

Multiple log files using logging module

2019-03-24 Thread Sharan Basappa
I have a test program that imports a design program. Both the programs need to log messages. I have tried the following: 1) Both the programs have the following lines: for handler in logging.root.handlers[:]: logging.root.removeHandler(handler) #Create and configure logger filename = os.