PythonWin: logging module not showing messages from imported modules

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rodrigostrauss@gmail.com

    #1

    PythonWin: logging module not showing messages from imported modules

    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

  • jmdeschamps@gmail.com

    #2
    Re: PythonWin: logging module not showing messages from imported modules


    rodrigostrauss@ gmail.com wrote:[color=blue]
    > 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[/color]

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

    Comment

    Working...