[ python-Bugs-900626 ] add logging.shutdown() to python logging module example code

SourceForge.net noreply at sourceforge.net
Sat Feb 21 03:36:48 EST 2004


Bugs item #900626, was opened at 2004-02-19 15:45
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=900626&group_id=5470

Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Manuel Schulte (manuel)
>Assigned to: Vinay Sajip (vsajip)
Summary: add logging.shutdown() to python logging module example code

Initial Comment:
Hi There,

I was trying to get logging with the logging module
working using code from the example provided in section
6.28.8.1 in the documentation.  My log file was empty
after program execution completed.  I ended up adding
'logging.shutdown()' to the end of the example code to
finally see the results in the file ('hdlr.close()'
works as well).

cheers,
manuel






----------------------------------------------------------------------

Comment By: Jim Jewett (jimjjewett)
Date: 2004-02-20 15:26

Message:
Logged In: YES 
user_id=764593

Correct, but ...

With current code, you want to be sure that you don't call 
shutdown more than once.

With CVS code, you will no longer need to call shutdown 
manually.  So the doco change won't be needed either.

If you just want to hurry the results along, you can call 
hdlr.flush(), which still leaves the handler open for further use.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=900626&group_id=5470



More information about the Python-bugs-list mailing list