Marc Abramowitz msabr...@gmail.com added the comment:
I just ran into this issue with Python 2.5 (doesn't seem to be an issue in =
2.6?) and for the benefit of anyone else, I'm copying the answer from `Vinay's
Google Group post
Marc Abramowitz msabr...@gmail.com added the comment:
Or for a practical example, here's how I used the above technique to solve this
problem in web2py:
diff --git a/gluon/main.py b/gluon/main.py
index 57bf647..2f69c6b 100644
--- a/gluon/main.py
+++ b/gluon/main.py
@@ -68,6 +68,13 @@
sebastian added the comment:
thank you very much...
but: [...] the class and arguments are evaluated using the
logging package's namespace. [...]
does this mean, it is not possible to use user-defined handlers,
naturally residing outside python's class library (and logging package),
when
Vinay Sajip added the comment:
No, it doesn't. See this post:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/21be57fae7e9381a
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1436
__
Christian Heimes added the comment:
confirmed
The problem is in logging.config._install_handlers(cp, formatters). The
code is usin klass = eval(klass, vars(logging)) args = eval(args,
vars(logging)) to get the logger class from the logging module.
--
nosy: +tiran
versions: +Python 2.6,
Changes by Christian Heimes:
--
assignee: - vsajip
nosy: +vsajip
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1436
__
___
Python-bugs-list
Guido van Rossum added the comment:
Somebody please propose a patch!
--
nosy: +gvanrossum
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1436
__
___
Python-bugs-list
Vinay Sajip added the comment:
This is not a bug: I think you are missing something. In the first
example (interactive usage), the lines import logging and import
logging.handlers do not magically introduce RotatingFileHandler into
your interactive session's globals. To do this, you would have
Changes by Vinay Sajip:
--
resolution: - invalid
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1436
__
___
Python-bugs-list mailing list