logging problems

Discussion in 'Python' started by Simon Dahlbacka, Apr 28, 2005.

  1. Hi,

    I'm currently using python 2.3.4 and I'm having problem with the logging module.

    Occasionally when logging something with exc_info=True it just hangs, nothing is
    logged, and software cannot continue executing.

    By drilling down into logging package and adding rather many print statements
    into logging/__init__.py it seems like the "import traceback" in
    formatException(self, ei) fails.

    I.e.

    print sys.modules["traceback"]
    import traceback
    print "Hello World"
    sys.stdout.flush()

    just renders: <module 'traceback' from 'C:\Python23\lib\traceback.pyc'> in the
    console, and no "Hello World"

    I'm running out of ideas what to try next, so suggestions/ideas appreciated!

    /Simon
     
    Simon Dahlbacka, Apr 28, 2005
    #1
    1. Advertising

  2. Simon Dahlbacka wrote:

    > print sys.modules["traceback"]
    > import traceback
    > print "Hello World"
    > sys.stdout.flush()
    >
    > just renders: <module 'traceback' from 'C:\Python23\lib\traceback.pyc'> in the
    > console, and no "Hello World"


    Works fine on Python 2.4 for Windows.

    > I'm running out of ideas what to try next, so suggestions/ideas appreciated!


    That's a very strange failure condition. Perhaps something is wrong with your
    Python installation. Have you edited any other system modules besides logging?

    I would try a clean installation of the newest version and see if that fixes
    it.
    --
    Michael Hoffman
     
    Michael Hoffman, Apr 29, 2005
    #2
    1. Advertising

  3. Simon Dahlbacka

    Guest

    I probably did not mention it, but I've used traceback module in other
    places, and it works fine.

    We've been planning to upgrade to 2.4 but unfortunately I cannot do
    that right now, and no, I have not messed with any other system modules.
     
    , Apr 29, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Siegl
    Replies:
    0
    Views:
    991
    Stefan Siegl
    Aug 27, 2003
  2. janne
    Replies:
    0
    Views:
    9,632
    janne
    Sep 10, 2004
  3. Christoph Haas
    Replies:
    0
    Views:
    484
    Christoph Haas
    Jun 12, 2006
  4. Christoph Haas
    Replies:
    1
    Views:
    493
    Vinay Sajip
    Jun 14, 2006
  5. johnny
    Replies:
    1
    Views:
    675
    Dennis Lee Bieber
    Dec 12, 2006
Loading...

Share This Page