]> granicus.if.org Git - python/commitdiff
Issue #7851: logging: clarification on logging configuration files.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 4 Feb 2010 20:23:45 +0000 (20:23 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 4 Feb 2010 20:23:45 +0000 (20:23 +0000)
Doc/library/logging.rst
Misc/NEWS

index 8a2443a2192d431ae374c8310db878d49d1cb700..bca497fdc790d2d78241ef73295f51259b626343 100644 (file)
@@ -422,6 +422,13 @@ You can see that the config file approach has a few advantages over the Python
 code approach, mainly separation of configuration and code and the ability of
 noncoders to easily modify the logging properties.
 
+Note that the class names referenced in config files need to be either relative
+to the logging module, or absolute values which can be resolved using normal
+import mechanisms. Thus, you could use either `handlers.WatchedFileHandler`
+(relative to the logging module) or `mypackage.mymodule.MyHandler` (for a
+class defined in package `mypackage` and module `mymodule`, where `mypackage`
+is available on the Python import path).
+
 .. _library-config:
 
 Configuring Logging for a Library
index 796c3a7966967c311c90bf9f59dce47b08718dae..6bb355bdcbfcebe356473e494aa29917d6c6286a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #7851: logging: clarification on logging configuration files.
+
 - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
   specified, rather than fall through to AF_PACKET (in the `socket` module).
   Also, raise ValueError rather than TypeError when an unknown TIPC address