Commit Graph

144 Commits

Author SHA1 Message Date
Vinay Sajip
82ea0f9517 Closes #25664: handled logger names in Unicode. 2015-12-26 12:21:47 +00:00
Gregory P. Smith
64707923be Issue21709: Call os.path.normcase when setting _srcfile for compatibility
with what findCaller() does when running on non-POSIX platforms.

(alternatively: the normcase calls in both places could be eliminated, but that
touches more code and that refactoring hasn't even been done in 3 yet...)
2015-10-22 13:12:20 -07:00
Gregory P. Smith
7427a79e12 Issue #21709: Fix the logging module to not depend upon __file__ being set
properly to get the filename of its caller from the stack.  This allows it
to work if run in a frozen or embedded environment where the module's
.__file__ attribute does not match its code object's .co_filename.

This same much simpler always correct approach has already been deployed and
used widely in Python 3.4 per the issue referenced above.
2015-10-22 13:09:50 -07:00
Serhiy Storchaka
1aa2c0f073 Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:10 +03:00
Vinay Sajip
5aad46e5c3 Issue #21172: isinstance check relaxed from dict to collections.Mapping. 2014-04-10 07:07:59 +01:00
Vinay Sajip
66d8dbeacf Issue #21149: Improved thread-safety in logging cleanup during interpreter shutdown. 2014-04-04 10:47:53 +01:00
Vinay Sajip
47fe4684ff Issue #19523: Closed FileHandler leak which occurred when delay was set. 2013-11-15 20:39:33 +00:00
Victor Stinner
a5cd255a7c Close #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging
module.
2013-10-15 23:36:56 +02:00
Vinay Sajip
fb03696fda Issue #18941: Respected delay when doing rollover. 2013-09-06 10:24:08 +01:00
Vinay Sajip
51b55517a1 Issue #9501: Improved shutdown handling to deal with module attributes correctly. 2013-01-15 17:55:13 +00:00
Andrew Svetlov
4bb142b1b7 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:27:37 +02:00
Vinay Sajip
1321c444d9 Closes #15710: accept long in _checkLevel. 2012-08-29 14:33:14 +01:00
Vinay Sajip
947f358a06 Issue #15541: Correct anomaly in logging.exception. Thanks to Ned Batchelder for the report. 2012-08-04 23:40:21 +01:00
Vinay Sajip
501982226a Fix added for recent changes in non-threading environments. 2012-02-23 20:45:03 +00:00
Vinay Sajip
16f6a29be8 Updated comments. 2012-02-23 19:40:33 +00:00
Vinay Sajip
d23845e270 logging: Added locking in flush() and close() handler methods. Thanks to Fayaz Yusuf Khan for the suggestion. 2012-02-23 19:37:18 +00:00
Vinay Sajip
6d102f18cb Closes #13807: Now checks for sys.stderr being there before writing to it. 2012-01-20 11:20:12 +00:00
Vinay Sajip
53703d9d72 Closes #13361: Raise correct exception type. 2011-11-07 10:13:18 +00:00
Vinay Sajip
74ab3440ba Closes #13661: Check added for type of logger name. 2011-11-07 08:49:16 +00:00
Vinay Sajip
caf0272d40 Closes #13356. Thanks to Florent Xicluna for the patch. 2011-11-07 08:43:51 +00:00
Vinay Sajip
5087d800c1 Corrected typo in comment. 2011-10-25 11:10:54 +01:00
Vinay Sajip
9a11b296b2 Closes #13232: Handle multiple encodings in exception logging. 2011-10-24 23:23:02 +01:00
Vinay Sajip
ee145ecc5f Issue #11444: Merge fix from 2.6. 2011-03-08 22:47:18 +00:00
Vinay Sajip
f4d0af460a Issue #11444: Lock handlers while flushing/closing during shutdown. 2011-03-08 22:39:55 +00:00
Vinay Sajip
5e8349e5cc Issue #9948: logging: fixed problem of losing filename case information. 2010-10-10 20:36:04 +00:00