 |
 |
 |
Python Servlet Engine Manual |
 |
 |
 |
As well as providing you with some basic information about the server,
the pse.plugins.server module also gives you an interface to
apache's logging facility.
- address
-
A tuple of the server's IP address and port.
- child_num
-
The number of the server's child process currently handling the
request.
- ip
-
Similar to address, but it is a string containing only the IP
address.
- log_level
-
The current logging level set for the server. This can be tested
against the logging levels listed below.
-
This function makes a log entry message in apache's ErrorLog
file using level notification level. These levels are analogous
to the internal apache notification levels.
The logging levels available for use in the log function and
for comparison to log_level are as follows:
- INFO
-
This can be used to provide general information about the state of the
application. This is the lowest non-debug logging level and is
usually not logged by apache by default.
- NOTICE
-
This is just a normal log entry for notification of certain events
that do not necessarily indicate an error. This is usually the lowest
level that is logged by apache by default. This is the default level
for the log function if no level is speficied.
- WARNING
-
This level can indicate a potential problem without necessarily
indicating an error in the application.
- ERROR
-
This level is almost always logged by apache and indicates an error in
the application.
- DEBUG
-
This is the lowest level that apache will log and usually has to be
explicitly turned on in the apache configuration file to see messages
logged at this level. This can be used to generate messages to aid in
debugging an application that you would not normally see in a
production environment.
Release 3.0.6, documentation updated on April 25, 2006.