Hi !
I'am trying set one extra logger in Pylons. My logger call
"actions". This should be a file timed routed (handler_access).
--------------------- development.ini ---------------------
[...]
# Logging configuration
[loggers]
keys = root, routes, zhradmin2, sqlalchemy, actions
[handlers]
keys = console, access
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.
[logger_zhradmin2]
level = DEBUG
handlers =
qualname = zhradmin2
[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[logger_actions]
level = INFO
handlers = access
qualname = action_recorder
[handler_access]
class = TimedRotatingFileHandler
args = ('logs/access.log', 'H', 24, 100)
level = NOTSET
formatter = generic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s %(message)s
datefmt = %d %m %Y %H:%M:%S
--------------------- end of file ---------------------
After i start paster i get following errors
--------------------- cut here ---------------------
Starting subprocess with file monitor
Traceback (most recent call last):
File "/usr/local/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')
()
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/serve.py", line 271, in command
self.logging_file_config(log_fn)
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 757, in logging_file_config
fileConfig(config_file)
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/util/logging_config.py", line 85, in fileConfig
handlers = _install_handlers(cp, formatters)
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/util/logging_config.py", line 155, in
_install_handlers
klass = _resolve(klass)
File "/usr/local/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/util/logging_config.py", line 95, in _resolve
found = __import__(used)
ImportError: No module named TimedRotatingFileHandler
--------------------- cut here ---------------------
What's wrong ? Pylons 0.9.7
P.S.
I still can import this handler from python console:
from logging.handlers import TimedRotatingFileHandler
Greetings from Poland.
--
Jan Koprowski
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---