logging problems

S

Simon Dahlbacka

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
 
M

Michael Hoffman

Simon said:
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.
 
S

simon.dahlbacka

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.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top