/usr/share/doc/python-web2py/examples/logging.example.conf is in python-web2py 1.99.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | # Configure the Python logging facility.
# To use this file, copy it to logging.conf and edit logging.conf as required.
# See http://docs.python.org/library/logging.html for details of the logging facility.
# Note that this is not the newer logging.config facility.
#
# The default configuration is console-based (stdout) for backward compatibility;
# edit the [handlers] section to choose a different logging destination.
#
# Note that file-based handlers are thread-safe but not mp-safe;
# for mp-safe logging, configure the appropriate syslog handler.
#
# To create a configurable logger for application 'myapp', add myapp to
# the [loggers] keys list and add a [logger_myapp] section, using
# [logger_welcome] as a starting point.
#
# In your application, create your logger in your model or in a controller:
#
# import logging
# logger = logging.getLogger("web2py.app.myapp")
# logger.setLevel(logging.DEBUG)
#
# To log a message:
#
# logger.debug("You ought to know that %s" % details)
#
# Note that a logging call will be governed by the most restrictive level
# set by the setLevel call, the [logger_myapp] section, and the [handler_...]
# section. For example, you will not see DEBUG messages unless all three are
# set to DEBUG.
[loggers]
keys=root,rocket,markdown,web2py,rewrite,app,welcome
[handlers]
keys=consoleHandler
#keys=consoleHandler,rotatingFileHandler
#keys=osxSysLogHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=WARNING
handlers=consoleHandler
[logger_web2py]
level=WARNING
handlers=consoleHandler
qualname=web2py
propagate=0
[logger_rewrite]
level=WARNING
qualname=web2py.rewrite
handlers=consoleHandler
propagate=0
# generic app handler
[logger_app]
level=WARNING
qualname=web2py.app
handlers=consoleHandler
propagate=0
# welcome app handler
[logger_welcome]
level=WARNING
qualname=web2py.app.welcome
handlers=consoleHandler
propagate=0
# loggers for legacy getLogger calls: Rocket and markdown
[logger_rocket]
level=WARNING
handlers=consoleHandler
qualname=Rocket
propagate=0
[logger_markdown]
level=WARNING
handlers=consoleHandler
qualname=markdown
propagate=0
[handler_consoleHandler]
class=StreamHandler
level=WARNING
formatter=simpleFormatter
args=(sys.stdout,)
# Rotating file handler
# mkdir logs in the web2py base directory if not already present
# args: (filename[, mode[, maxBytes[, backupCount[, encoding[, delay]]]]])
#
[handler_rotatingFileHandler]
class=handlers.RotatingFileHandler
level=INFO
formatter=simpleFormatter
args=("logs/web2py.log", "a", 1000000, 5)
[handler_osxSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=("/var/run/syslog", handlers.SysLogHandler.LOG_DAEMON)
[handler_linuxSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=("/dev/log", handlers.SysLogHandler.LOG_DAEMON)
[handler_remoteSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=(('sysloghost.domain.com', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_DAEMON)
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=
|