PythonWin: logging module not showing messages from imported modules

R

rodrigostrauss

Having the following code:

==== Module1.py ====
import logging
def X():
logging.error('test')

If I import it into PythonWin console and call X(), the error message
is not printed. If I do the same in Python console the message is
printed. Do I need to configure the logging module or it's a problem
with PythonWin?

If I call logging.error() in the PythonWin console it works like a
charm. The problem is just regarding imported modules.


Rodrigo Strauss
 
J

jmdeschamps

Having the following code:

==== Module1.py ====
import logging
def X():
logging.error('test')

If I import it into PythonWin console and call X(), the error message
is not printed. If I do the same in Python console the message is
printed. Do I need to configure the logging module or it's a problem
with PythonWin?

If I call logging.error() in the PythonWin console it works like a
charm. The problem is just regarding imported modules.


Rodrigo Strauss

Do you *run* module1 before attempting to call X() from the interactive
window?
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top