Apache2
ap_errorlog_provider Struct Reference

#include <http_core.h>

Data Fields

void *(* init )(apr_pool_t *p, server_rec *s)
 
apr_status_t(* writer )(const ap_errorlog_info *info, void *handle, const char *errstr, apr_size_t len)
 
const char *(* parse_errorlog_arg )(cmd_parms *cmd, const char *arg)
 
unsigned int flags
 

Field Documentation

◆ flags

unsigned int ap_errorlog_provider::flags

a combination of the AP_ERRORLOG_PROVIDER_* flags

◆ init

void*(* ap_errorlog_provider::init) (apr_pool_t *p, server_rec *s)

Initializes the error log writer.

Parameters
pThe pool to create any storage from
sServer for which the logger is initialized
Returns
Pointer to handle passed later to writer() function
Note
On success, the provider must return non-NULL, even if the handle is not necessary when the writer() function is called. On failure, the provider should log a startup error message and return NULL to abort httpd startup.

◆ parse_errorlog_arg

const char*(* ap_errorlog_provider::parse_errorlog_arg) (cmd_parms *cmd, const char *arg)

Checks syntax of ErrorLog directive argument.

Parameters
cmdThe config directive
argErrorLog directive argument (or the empty string if no argument was provided)
Returns
Error message or NULL on success
Remarks
The argument will be stored in the error_fname field of server_rec for access later.

◆ writer

apr_status_t(* ap_errorlog_provider::writer) (const ap_errorlog_info *info, void *handle, const char *errstr, apr_size_t len)

Logs the error message to external error log.

Parameters
infoContext of the error message
handleHandle created by init() function
errstrError message
lenLength of the error message

The documentation for this struct was generated from the following file: