view wiki/config/logging/logfile @ 3105:80e1a910a2f1

make logging more configurable and flexible, packages/modules shall call MoinMoin.server.getLogger
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 21:43:47 +0100
parents
children 4cd113328476
line wrap: on
line source
    logging_defaults = {
        # Directory where logfiles will be created.
        # Make sure the running moin process has create/write rights there.
        'logdir': '/path/to/logdir',
        # Default loglevel, to adjust verbosity: DEBUG, INFO, WARNING, ERROR, CRITICAL
        'loglevel': 'DEBUG',
    }
    logging_config = """\
[loggers]
keys=root

[handlers]
keys=logfile

[formatters]
keys=logfile

[logger_root]
level=NOTSET
handlers=logfile

[handler_logfile]
class=StreamHandler
formatter=logfile
level=%(loglevel)s
args=('%(logdir)s/moin.log', 'at')

[formatter_logfile]
format=%(asctime)s %(name)s %(levelname)s %(message)s
datefmt=
class=logging.Formatter
"""