Fixed a wrong import path in the documentation. Fixes #102

This commit is contained in:
Armin Ronacher 2010-08-07 13:41:06 +02:00
parent c41a1cd8dc
commit 38107c752c

View file

@ -89,7 +89,7 @@ There are a couple of handlers provided by the logging system out of the
box but not all of them are useful for basic error logging. The most box but not all of them are useful for basic error logging. The most
interesting are probably the following: interesting are probably the following:
- :class:`~logging.handlers.FileHandler` - logs messages to a file on the - :class:`~logging.FileHandler` - logs messages to a file on the
filesystem. filesystem.
- :class:`~logging.handlers.RotatingFileHandler` - logs messages to a file - :class:`~logging.handlers.RotatingFileHandler` - logs messages to a file
on the filesystem and will rotate after a certain number of messages. on the filesystem and will rotate after a certain number of messages.
@ -105,7 +105,7 @@ above, just make sure to use a lower setting (I would recommend
if not app.debug: if not app.debug:
import logging import logging
from logging.handlers import TheHandlerYouWant from themodule import TheHandler YouWant
file_handler = TheHandlerYouWant(...) file_handler = TheHandlerYouWant(...)
file_handler.setLevel(logging.WARNING) file_handler.setLevel(logging.WARNING)
app.logger.addHandler(file_handler) app.logger.addHandler(file_handler)