Vinay Sajip
03d5c346c0
Issue #7120 : logging: Removed import of multiprocessing which is causing crash in GAE.
2009-10-16 14:06:44 +00:00
Vinay Sajip
dd3aa9afee
Issue #7120 : logging: Removed import of multiprocessing which is causing crash in GAE.
2009-10-14 19:53:23 +00:00
Vinay Sajip
1c77b7f84c
Issue #7086 : Added TCP support to SysLogHandler and tidied up some anachronisms in the code.
2009-10-10 20:32:36 +00:00
Vinay Sajip
fbbbb20054
Issue #7052 : Removed captureWarnings from __all__
2009-10-04 12:20:12 +00:00
Georg Brandl
2b4df43c1c
#7052 : remove nonexisting NullHandler from logging.__all__.
2009-10-04 09:03:59 +00:00
Vinay Sajip
6d50b37b7c
Issue #7014 : logging: Improved IronPython 2.6 compatibility.
2009-09-29 07:11:53 +00:00
Vinay Sajip
f70867aabc
Issue #7014 : logging: Improved IronPython 2.6 compatibility.
2009-09-29 07:08:54 +00:00
Vinay Sajip
4780c9a0e0
Tidied up name of parameter in StreamHandler
2009-09-26 14:53:32 +00:00
Vinay Sajip
cbb24b35a0
Issue #6314 : logging: Extra checks on the "level" argument in more places.
2009-07-13 11:21:05 +00:00
Vinay Sajip
603fb6d667
Issue #6314 : logging.basicConfig() performs extra checks on the "level" argument.
2009-06-21 17:37:27 +00:00
Vinay Sajip
ff4018f388
Issue #5262 : Fixed bug in next roll over time computation in TimedRotatingFileHandler.
2009-06-11 10:01:04 +00:00
Vinay Sajip
91290b5f53
Issue #5262 : Improved fix.
2009-06-11 09:53:35 +00:00
Vinay Sajip
83da034c9a
Issue #5262 : Fixed bug in next roll over time computation in TimedRotatingFileHandler.
2009-06-11 09:23:41 +00:00
Vinay Sajip
28274ab6cf
Issue #5971 : StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback.
2009-05-09 12:11:30 +00:00
Vinay Sajip
f9b01fe692
Issue #5971 : StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback.
2009-05-09 12:07:17 +00:00
Vinay Sajip
229bc0119a
Issue #5854 : Updated __all__ to include some missing names and remove some names which should not be exported.
2009-04-27 13:51:32 +00:00
Vinay Sajip
e34d6aa86f
Issue #5854 : Updated __all__ to include some missing names and remove some names which should not be exported.
2009-04-27 13:44:27 +00:00
Vinay Sajip
ae7c4a0a42
Issue #5170 : Fixed regression caused when fixing #5768 .
2009-04-22 12:12:43 +00:00
Vinay Sajip
cbb5308723
Issue #5170 : Fixed regression caused when fixing #5768 .
2009-04-22 12:10:47 +00:00
Vinay Sajip
cbe744ae43
Issue #5768 : Change to Unicode output logic and test case for same.
2009-04-16 19:11:35 +00:00
Vinay Sajip
74f045088d
Issue #5768 : Change to Unicode output logic and test case for same.
2009-04-16 19:07:37 +00:00
Benjamin Peterson
7fd6068c3e
Merged revisions 68737 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68737 | jesse.noller | 2009-01-18 15:04:36 -0600 (Sun, 18 Jan 2009) | 1 line
issue 4301: patch logging to add processName, remove the old _check_logger_class code
........
2009-03-13 20:48:10 +00:00
Vinay Sajip
1a0d2befea
#5287 : Add exception handling around findCaller() call to help out IronPython.
2009-02-19 12:31:32 +00:00
Vinay Sajip
8347042093
#5287 : Add exception handling around findCaller() call to help out IronPython.
2009-02-17 17:47:15 +00:00
Vinay Sajip
9c78658670
Issue #5170 : Fixed Unicode output bug in logging and added test case. This is a regression which did not occur in 2.5.
2009-02-08 19:14:41 +00:00
Vinay Sajip
b20af944d2
Issue #5170 : Fixed Unicode output bug in logging and added test case. This is a regression which did not occur in 2.5.
2009-02-08 19:06:08 +00:00
Vinay Sajip
592f5fcb8d
Issue 5013: Fixed bug in FileHandler when delay was set - added fix for RotatingFileHandler and changed header comment slightly.
2009-01-20 23:20:02 +00:00
Vinay Sajip
aecf36a0b5
Issue 5013: Fixed bug in FileHandler when delay was set - added fix for RotatingFileHandler and changed header comment slightly.
2009-01-20 23:16:08 +00:00
Vinay Sajip
6badbe9f76
Issue 5013: Fixed bug in FileHandler when delay was set.
2009-01-20 22:49:13 +00:00
Vinay Sajip
5fb11b2b85
Issue 5013: Fixed bug in FileHandler when delay was set.
2009-01-20 22:43:17 +00:00
Jesse Noller
438195fc11
issue 4301: patch logging to add processName, remove the old _check_logger_class code
2009-01-18 21:04:36 +00:00
Kristján Valur Jónsson
84040dbe81
Issue 4336: Let users of HTTPConnection.endheaders() submit a message body to the function if required.
2009-01-09 20:27:16 +00:00
Benjamin Peterson
c6e80eb5ee
Merged revisions 67654,67676-67677,67681,67692,67725,67746,67748,67761,67784-67785,67787-67788,67802,67832,67848-67849,67859,67862-67864,67880,67882,67885,67889-67892,67895 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
................
r67654 | georg.brandl | 2008-12-07 16:42:09 -0600 (Sun, 07 Dec 2008) | 2 lines
#4457 : rewrite __import__() documentation.
................
r67676 | benjamin.peterson | 2008-12-08 20:03:03 -0600 (Mon, 08 Dec 2008) | 1 line
specify how things are copied
................
r67677 | benjamin.peterson | 2008-12-08 20:05:11 -0600 (Mon, 08 Dec 2008) | 1 line
revert unrelated change to installer script
................
r67681 | jeremy.hylton | 2008-12-09 15:03:10 -0600 (Tue, 09 Dec 2008) | 2 lines
Add simple unittests for Request
................
r67692 | amaury.forgeotdarc | 2008-12-10 18:03:42 -0600 (Wed, 10 Dec 2008) | 2 lines
#1030250 : correctly pass the dry_run option to the mkpath() function.
................
r67725 | benjamin.peterson | 2008-12-12 22:02:20 -0600 (Fri, 12 Dec 2008) | 1 line
fix incorrect example
................
r67746 | antoine.pitrou | 2008-12-13 17:12:30 -0600 (Sat, 13 Dec 2008) | 3 lines
Issue #4163 : Use unicode-friendly word splitting in the textwrap functions when given an unicode string.
................
r67748 | benjamin.peterson | 2008-12-13 19:46:11 -0600 (Sat, 13 Dec 2008) | 1 line
remove has_key usage
................
r67761 | benjamin.peterson | 2008-12-14 11:26:04 -0600 (Sun, 14 Dec 2008) | 1 line
fix missing bracket
................
r67784 | georg.brandl | 2008-12-15 02:33:58 -0600 (Mon, 15 Dec 2008) | 2 lines
#4446 : document "platforms" argument for setup().
................
r67785 | georg.brandl | 2008-12-15 02:36:11 -0600 (Mon, 15 Dec 2008) | 2 lines
#4611 : fix typo.
................
r67787 | georg.brandl | 2008-12-15 02:58:59 -0600 (Mon, 15 Dec 2008) | 2 lines
#4578 : fix has_key() usage in compiler package.
................
r67788 | georg.brandl | 2008-12-15 03:07:39 -0600 (Mon, 15 Dec 2008) | 2 lines
#4568 : remove limitation in varargs callback example.
................
r67802 | amaury.forgeotdarc | 2008-12-15 16:29:14 -0600 (Mon, 15 Dec 2008) | 4 lines
#3632 : the "pyo" macro from gdbinit can now run when the GIL is released.
Patch by haypo.
................
r67832 | antoine.pitrou | 2008-12-17 16:46:54 -0600 (Wed, 17 Dec 2008) | 4 lines
Issue #2467 : gc.DEBUG_STATS reports invalid elapsed times.
Patch by Neil Schemenauer, very slightly modified.
................
r67848 | benjamin.peterson | 2008-12-18 20:28:56 -0600 (Thu, 18 Dec 2008) | 1 line
fix typo
................
r67849 | benjamin.peterson | 2008-12-18 20:31:35 -0600 (Thu, 18 Dec 2008) | 1 line
_call_method -> _callmethod and _get_value to _getvalue
................
r67859 | amaury.forgeotdarc | 2008-12-19 16:56:48 -0600 (Fri, 19 Dec 2008) | 4 lines
#4700 : crtlicense.txt is displayed by the license() command and should be kept ascii-only.
Will port to 3.0
................
r67862 | benjamin.peterson | 2008-12-19 20:48:02 -0600 (Fri, 19 Dec 2008) | 1 line
copy sentence from docstring
................
r67863 | benjamin.peterson | 2008-12-19 20:51:26 -0600 (Fri, 19 Dec 2008) | 1 line
add headings
................
r67864 | benjamin.peterson | 2008-12-19 20:57:19 -0600 (Fri, 19 Dec 2008) | 1 line
beef up docstring
................
r67880 | benjamin.peterson | 2008-12-20 16:49:24 -0600 (Sat, 20 Dec 2008) | 1 line
remove redundant sentence
................
r67882 | benjamin.peterson | 2008-12-20 16:59:49 -0600 (Sat, 20 Dec 2008) | 1 line
add some recent releases to the list
................
r67885 | benjamin.peterson | 2008-12-20 17:48:54 -0600 (Sat, 20 Dec 2008) | 1 line
silence annoying DeprecationWarning
................
r67889 | benjamin.peterson | 2008-12-20 19:04:32 -0600 (Sat, 20 Dec 2008) | 1 line
sphinx.web is long gone
................
r67890 | benjamin.peterson | 2008-12-20 19:12:26 -0600 (Sat, 20 Dec 2008) | 1 line
update readme
................
r67891 | benjamin.peterson | 2008-12-20 19:14:47 -0600 (Sat, 20 Dec 2008) | 1 line
there are way too many places which need to have the current version added
................
r67892 | benjamin.peterson | 2008-12-20 19:29:32 -0600 (Sat, 20 Dec 2008) | 9 lines
Merged revisions 67809 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line
fix logic error
........
................
r67895 | neal.norwitz | 2008-12-21 08:28:32 -0600 (Sun, 21 Dec 2008) | 2 lines
Add Tarek for work on distutils.
................
2008-12-21 17:01:26 +00:00
Benjamin Peterson
3e16f3dd7f
remove has_key usage
2008-12-14 01:46:11 +00:00
Vinay Sajip
6831d6bc7f
Took Nick Coghlan's advice about importing warnings globally in logging, to avoid the possibility of race conditions: "This could deadlock if a thread spawned as a side effect of importing a module happens to trigger a warning. warnings is pulled into sys.modules as part of the interpreter startup - having a global 'import warnings' shouldn't have any real effect on logging's import time."
2008-12-04 20:32:18 +00:00
Vinay Sajip
213faca204
Issue #4384 : Added logging integration with warnings module using captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging.
2008-12-03 23:22:58 +00:00
Vinay Sajip
65d66e1006
Issue #3772 : Fixed regression problem in StreamHandler.emit().
2008-09-04 07:31:21 +00:00
Vinay Sajip
6a2fd81316
Issue #3726 : Allowed spaces in separators in logging configuration files.
2008-09-03 09:20:05 +00:00
Vinay Sajip
72ed07843a
logging: fixed lack of use of encoding attribute specified on a stream.
2008-09-01 14:30:10 +00:00
Benjamin Peterson
a9b2222de4
change a few uses of the threading APIs
2008-08-18 18:01:43 +00:00
Brett Cannon
e6bfe80b67
Remove dict.has_key() and apply() usage from the logging package to silence
...
warnings when run under -3.
2008-08-04 00:09:43 +00:00
Vinay Sajip
bc7e34f692
Issue #3389 : Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch.
2008-07-18 08:59:06 +00:00
Vinay Sajip
5ff7171ddc
Removed out-of-date comment in _install_handlers and
...
used issubclass in place of equality comparison of classes.
2008-06-29 21:25:28 +00:00
Vinay Sajip
5f7b97d987
Bug #3136 : fileConfig()'s disabling of old loggers is now conditional via an optional disable_existing_loggers parameter, but the default value is such that the old behaviour is preserved.
...
Thanks to Leandro Lucarella for the patch.
2008-06-19 22:40:17 +00:00
Vinay Sajip
8f96b8ec43
Bug #3126 : StreamHandler and FileHandler check before calling "flush" and "close" that the stream object has these, using hasattr (thanks to bobf for the patch).
2008-06-17 11:02:14 +00:00
Benjamin Peterson
0fbcf69455
give the threading API PEP 8 names
2008-06-11 17:27:50 +00:00
Georg Brandl
392c6fc02d
ConfigParser renaming reversal part 3: move module into place and adapt imports.
2008-05-25 07:25:25 +00:00
Georg Brandl
e152a77d96
socketserver renaming reversal part 3: move the module into the right
...
place and fix all references to it. Closes #2926 .
2008-05-24 18:31:28 +00:00
Vinay Sajip
a12da73c46
Fixed : #2914 (RFE for UTC support in TimedRotatingFileHandler) and #2929 (wrong filename used to delete old log files).
2008-05-20 15:34:36 +00:00
Alexandre Vassalotti
e2514c6f10
Updated import statements to use the new `configparser` module name.
...
Updated the documentation to use the new name.
Revert addition of the stub entry for the old name.
Georg, I am reverting your changes since this commit should propagate
to py3k.
2008-05-14 22:44:22 +00:00
Alexandre Vassalotti
d192c925ac
Updated all import statements to use the new socketserver module name.
...
Renamed socketserver module in its own documentation.
Renamed documentation references.
2008-05-12 02:11:22 +00:00
Vinay Sajip
e5aefa0b30
Fix : #2315 , #2316 , #2317 : TimedRotatingFileHandler - changed logic to better handle daylight savings time, deletion of old log files, and fixed a bug in calculating rollover when no logging occurs for a longer interval than the rollover period.
2008-04-02 21:09:27 +00:00
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