Christian Heimes
c5f05e45cf
Patch #2167 from calvin: Remove unused imports
2008-02-23 17:40:11 +00:00
Raymond Hettinger
71fa93af22
Add __all__ to logging module.
2008-02-16 01:22:54 +00:00
Vinay Sajip
92aa2f8d6b
Added optional delay argument to FileHandler and subclasses.
2008-01-24 12:37:33 +00:00
Vinay Sajip
97ef165a1d
Added optional delay argument to FileHandler and subclasses.
2008-01-24 12:37:08 +00:00
Vinay Sajip
ae747dccab
Fix : #1836 : Off-by-one bug in TimedRotatingFileHandler rollover calculation. Patch thanks to Kathryn M. Kowalski.
2008-01-21 17:02:26 +00:00
Vinay Sajip
a26c73ed55
Added LoggerAdapter class, changed copyright dates, made check for extra parameter passed to logging methods explicitly against None rather than a truth value.
2008-01-18 15:55:57 +00:00
Vinay Sajip
95dd03b8b8
Fixed a bug reported (in private email, by Robert Crida) in logging configuration whereby child loggers of a logger named in a configuration file, which are not themselves named in the configuration, are disabled when the configuration is applied.
2007-11-11 14:27:30 +00:00
Vinay Sajip
bababa3ecc
Bug #1321 : Fixed logic error in TimedRotatingFileHandler.__init__()
2007-10-24 10:47:06 +00:00
Vinay Sajip
c537881caa
Change to LogRecord.__init__() to fix #1206 . Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
2007-09-27 07:35:10 +00:00
Vinay Sajip
66ba9ffcb1
Minor date change.
2007-09-27 06:56:13 +00:00
Vinay Sajip
90d93615d6
Change to basicConfig() to fix #1021 .
2007-09-27 05:38:51 +00:00
Vinay Sajip
4df367c08d
Change to flush and close logic to fix #1760556 .
2007-09-27 05:34:45 +00:00
Georg Brandl
daa6f254c6
Patch #1779550 : remove redundant code in logging.
2007-08-23 21:55:57 +00:00
Georg Brandl
75ec1dbd9d
Bug #1737864 : allow empty message in logging format routines.
2007-06-19 12:36:00 +00:00
Vinay Sajip
754a5fb640
Updated docstring for SysLogHandler ( #1720726 ).
2007-05-25 07:05:59 +00:00
Vinay Sajip
70c8e8b861
Added new optional credentials argument to SMTPHandler.__init__, and smtp.login() is now called in SMTPHandler.emit() if credentials are specified.
2007-05-01 10:20:03 +00:00
Vinay Sajip
aa7b16a888
Added optional timeout to SocketHandler.makeSocket (SF #1695948 )
2007-04-09 16:16:10 +00:00
Vinay Sajip
f7ccc101d2
Minor fix for currentframe (SF #1652788 ).
2007-02-16 22:36:24 +00:00
Georg Brandl
5a096e1b10
Use new email module names ( #1637162 , #1637159 , #1637157 ).
2007-01-22 19:40:21 +00:00
Vinay Sajip
b3d8a06a46
Updated rotating file handlers to use _open().
2007-01-16 09:50:07 +00:00
Vinay Sajip
73306b07ed
Added WatchedFileHandler (based on SF patch #1598415 )
2007-01-14 21:49:59 +00:00
Vinay Sajip
1211edd81b
Added a docstring
2007-01-09 14:54:56 +00:00
Vinay Sajip
825b75a053
Bug #1627575 : Added _open() method to FileHandler which can be used to reopen files. The FileHandler instance now saves the encoding (which can be None) in an attribute called "encoding".
2007-01-09 14:50:28 +00:00
Vinay Sajip
2cd79f6b78
Bare except clause removed from LogRecord.__init__. Now, only ValueError, TypeError and AttributeError are trapped.
...
(SF #411881 )
2007-01-08 18:51:46 +00:00
Vinay Sajip
c683a87ca6
Bare except clause removed from SMTPHandler.emit(). Now, only ImportError is trapped.
...
Bare except clause removed from SocketHandler.createSocket(). Now, only socket.error is trapped.
(SF #411881 )
2007-01-08 18:50:32 +00:00
Vinay Sajip
66a1726620
Patch by "cuppatea" (SF #1503765 )
2006-12-11 14:26:23 +00:00
Vinay Sajip
5492e1722a
Patch by Jeremy Katz (SF #1609407 )
2006-12-11 14:07:16 +00:00
Vinay Sajip
ef7f3bf3b3
Change to improve speed of _fixupChildren
2006-10-31 17:32:37 +00:00
Vinay Sajip
2c050af28b
Modified LogRecord.__init__ to make the func parameter optional. (See SF #1569622 ).
2006-10-03 18:21:56 +00:00
Georg Brandl
4e933137af
Fix missing import of the types module in logging.config.
2006-09-06 20:05:58 +00:00
Georg Brandl
f3e304297e
Repair logging test spew caused by rev. 51206.
2006-08-12 08:32:02 +00:00
Georg Brandl
0a7d1bb168
logging's atexit hook now runs even if the rest of the module has
...
already been cleaned up.
2006-08-11 07:26:10 +00:00
Vinay Sajip
dc57936b63
Addressed SF#1524081 by using a dictionary to map level names to syslog priority names, rather than a string.lower().
2006-07-20 23:20:12 +00:00
Vinay Sajip
cea4bf092d
Fixed bug in fileConfig() which failed to clear logging._handlerList
2006-06-30 00:13:08 +00:00
Vinay Sajip
6dd59f1632
Removed buggy exception handling in doRollover of rotating file handlers. Exceptions now propagate to caller.
2006-06-27 07:34:37 +00:00
Vinay Sajip
9e9c2528a4
Changed status from "beta" to "production"; since logging has been part of the stdlib since 2.3, it should be safe to make this assertion ;-)
2006-05-18 07:28:58 +00:00
Vinay Sajip
4b4a63e30a
Replaced my dumb way of calculating seconds to midnight with Tim Peters' much more sensible suggestion. What was I thinking ?!?
2006-05-02 08:35:36 +00:00
Vinay Sajip
502348d010
StreamHandler now checks explicitly for None before using sys.stderr as the stream (see SF bug #1463840 ).
2006-04-11 21:42:00 +00:00
Vinay Sajip
a2173a189a
Catch situations where currentframe() returns None. See SF patch #1447410 , this is a different implementation.
2006-03-15 12:45:07 +00:00
Vinay Sajip
d364a07517
Added logThreads and logProcesses to allow conditional omission of logging this information
2006-03-13 22:05:28 +00:00
Vinay Sajip
ed1992f2aa
Added function name to LogRecord.
2006-02-09 08:48:36 +00:00
Vinay Sajip
260ce43252
Propagate exceptions from shutdown() if raiseExceptions is not set.
...
Added 'extra' keyword argument handling to logging calls, as discussed on python-dev.
2006-02-09 08:34:14 +00:00
Vinay Sajip
e0f85926d6
Removed defensive test in Handler.close
2006-02-07 13:55:52 +00:00
Neal Norwitz
55cd82fe0a
Get test_logging to not hang when running under regrtest.py -R ::
...
Not sure why/how _handlers/_handlerList is out of sync. This could
indicate a deeper problem.
In test_logging, the only absolutely necessary change to get working
was tcpserver.abort = 1. But we don't want to wait infinitely
to join the threads, so give a 2.0 second timeout.
There doesn't appear to be a need for a local abort variable
in serve_until_stopped, so just use the instance member.
Note the problem is only on HEAD, not in 2.4.
2006-02-05 08:21:08 +00:00
Vinay Sajip
7a7160bd0c
Added the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway.
2006-01-20 18:28:03 +00:00
Vinay Sajip
989b69a519
Refactoring for fileConfig. Contributed by Shane Hathaway.
2006-01-16 21:28:37 +00:00
Vinay Sajip
814fa0fe11
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
2006-01-16 09:27:58 +00:00
Vinay Sajip
e928977b80
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
2006-01-16 09:27:10 +00:00
Vinay Sajip
d952041dc7
TimedRotatingFileHandler now calculates next rollover from previous rollover rather than current time.
2006-01-16 09:13:58 +00:00
Vinay Sajip
74a83e9ffb
Fixed bug in time-to-midnight calculation.
2006-01-16 09:08:06 +00:00