Home | Trees | Indices | Help |
|
---|
|
object --+ | LogManager
An object to assist both simple and advanced logging.
``cherrypy.log`` is an instance of this class.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
appid = None The id() of the Application object which owns this log manager. |
|||
error_log = None The actual :class:`logging.Logger` instance for error messages. |
|||
access_log = None The actual :class:`logging.Logger` instance for access messages. |
|||
access_log_format =
|
|||
logger_root = None The "top-level" logger name. |
|
|||
screen Turn stderr/stdout logging on or off. |
|||
error_file The filename for self.error_log. |
|||
access_file The filename for self.access_log. |
|||
wsgi Write errors to wsgi.errors. |
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Write the given ``msg`` to the error log. This is not just for errors! Applications may call this at any time to log application-specific information. If ``traceback`` is True, the traceback of the current exception (if any) will be appended to ``msg``. |
Write to the access log (in Apache/NCSA Combined Log format). See the `apache documentation <http://httpd.apache.org/docs/current/logs.html#combined>`_ for format details. CherryPy calls this automatically for you. Note there are no arguments; it collects the data itself from :class:`cherrypy.request<cherrypy._cprequest.Request>`. Like Apache started doing in 2.0.46, non-printable and other special characters in %r (and we expand that to all parts) are escaped using \xhh sequences, where hh stands for the hexadecimal representation of the raw byte. Exceptions from this rule are " and \, which are escaped by prepending a backslash, and all whitespace characters, which are written in their C-style notation (\n, \t, etc). |
|
appidThe id() of the Application object which owns this log manager. If this is a global log manager, appid is None.
|
access_log_format
|
logger_rootThe "top-level" logger name. This string will be used as the first segment in the Logger names. The default is "cherrypy", for example, in which case the Logger names will be of the form: cherrypy.error.<appid> cherrypy.access.<appid>
|
|
screenTurn stderr/stdout logging on or off. If you set this to True, it'll add the appropriate StreamHandler for you. If you set it to False, it will remove the handler.
|
error_fileThe filename for self.error_log. If you set this to a string, it'll add the appropriate FileHandler for you. If you set it to ``None`` or ``''``, it will remove the handler.
|
access_fileThe filename for self.access_log. If you set this to a string, it'll add the appropriate FileHandler for you. If you set it to ``None`` or ``''``, it will remove the handler.
|
wsgiWrite errors to wsgi.errors. If you set this to True, it'll add the appropriate :class:`WSGIErrorHandler<cherrypy._cplogging.WSGIErrorHandler>` for you (which writes errors to ``wsgi.errors``). If you set it to False, it will remove the handler. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jun 30 21:23:15 2014 | http://epydoc.sourceforge.net |