4.5.7.1 Server Methods

get_config( )
Similar to req.get_config(), but returns a table object holding only the mod_python configuration defined at global scope within the Apache configuration. That is, outside of the context of any VirtualHost, Location, Directory or Files directives.

get_options( )
Similar to req.get_options(), but returns a table object holding only the mod_python options defined at global scope within the Apache configuration. That is, outside of the context of any VirtualHost, Location, Directory or Files directives.

log_error( message[, level])
An interface to the Apache ap_log_error function. message is a string with the error message, level is one of the following flags constants:

    APLOG_EMERG
    APLOG_ALERT
    APLOG_CRIT
    APLOG_ERR
    APLOG_WARNING
    APLOG_NOTICE
    APLOG_INFO
    APLOG_DEBUG
    APLOG_NOERRNO

If you need to write to log and do not have a reference to a server or request object, use the apache.log_error function.

register_cleanup( request, callable[, data])
Registers a cleanup. Very similar to req.register_cleanup(), except this cleanup will be executed at child termination time. This function requires the request object be supplied to infer the interpreter name. If you don't have any request object at hand, then you must use the apache.register_cleanup variant. Warning: do not pass directly or indirectly a request object in the data parameter. Since the callable will be called at server shutdown time, the request object won't exist anymore and any manipulation of it in the callable will give undefined behaviour.