Package cherrypy :: Module _cplogging :: Class LogManager
[hide private]
[frames] | no frames]

Class LogManager

source code

object --+
         |
        LogManager
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, appid=None, logger_root='cherrypy')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
reopen_files(self)
Close and reopen all file handlers.
source code
 
error(self, msg='', context='', severity=20, traceback=False)
Write to the error log.
source code
 
__call__(self, *args, **kwargs)
Write to the error log.
source code
 
access(self)
Write to the access log (in Apache/NCSA Combined Log format).
source code
 
time(self)
Return now() in Apache Common Log Format (no timezone).
source code
 
_get_builtin_handler(self, log, key) source code
 
_set_screen_handler(self, log, enable, stream=None) source code
 
_get_screen(self) source code
 
_set_screen(self, newvalue) source code
 
_add_builtin_file_handler(self, log, fname) source code
 
_set_file_handler(self, log, filename) source code
 
_get_error_file(self) source code
 
_set_error_file(self, newvalue) source code
 
_get_access_file(self) source code
 
_set_access_file(self, newvalue) source code
 
_set_wsgi_handler(self, log, enable) source code
 
_get_wsgi(self) source code
 
_set_wsgi(self, newvalue) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  appid = None
  error_log = None
  access_log = None
  access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b...
Properties [hide private]
  screen
If True, error and access will print to stderr.
  error_file
The filename for self.error_log.
  access_file
The filename for self.access_log.
  wsgi
If True, error messages will be sent to wsgi.errors.

Inherited from object: __class__

Method Details [hide private]

__init__(self, appid=None, logger_root='cherrypy')
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

error(self, msg='', context='', severity=20, traceback=False)

source code 

Write to the error log.

This is not just for errors! Applications may call this at any time to log application-specific information.

__call__(self, *args, **kwargs)
(Call operator)

source code 

Write to the error log.

This is not just for errors! Applications may call this at any time to log application-specific information.

access(self)

source code 

Write to the access log (in Apache/NCSA Combined Log format).

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).


Class Variable Details [hide private]

access_log_format

Value:
'%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'

Property Details [hide private]

screen

If True, error and access will print to stderr.

Get Method:
_get_screen(self)
Set Method:
_set_screen(self, newvalue)

error_file

The filename for self.error_log.

Get Method:
_get_error_file(self)
Set Method:
_set_error_file(self, newvalue)

access_file

The filename for self.access_log.

Get Method:
_get_access_file(self)
Set Method:
_set_access_file(self, newvalue)

wsgi

If True, error messages will be sent to wsgi.errors.

Get Method:
_get_wsgi(self)
Set Method:
_set_wsgi(self, newvalue)