[Apache]

Package Name: Apache logging library

struct piped_log


struct piped_log

Source:./include/http_log.h

The piped logging structure. Piped logs are used to move functionality out of the main server. For example, log rotation is done with piped logs.

Member Index

Class Variables

apr_file_t *fds[2];
The pipe between the server and the logging process

apr_pool_t *p;
The pool to use for the piped log

apr_proc_t *pid;
The pid of the logging process

char *program;
The name of the program the logging process is running

Global Functions

(void);
Set up for logging to stderr.

Parameters
pThe pool to allocate out of
(apr_status_t);
Replace logging to stderr with logging to the given file.

Parameters
pThe pool to allocate out of
fileName of the file to log stderr output
(void);
Log the current pid of the parent process

Parameters
pThe pool to use for logging
fnameThe name of the file to log to
(apr_status_t);
Retrieve the pid from a pidfile.

Parameters
pThe pool to use for logging
filenameThe name of the file containing the pid
mypidPointer to pid_t (valid only if return APR_SUCCESS)
void ap_logs_child_init(apr_pool_t *p, server_rec *s);
Perform special processing for piped loggers in MPM child processes.

ap_logs_child_init is not for use by modules; it is an internal core function

Parameters
pNot used
sNot used
int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s_main);
Open the error log and replace stderr with it.

ap_open_logs isn't expected to be used by modules, it is an internal core function

Parameters
pconfNot used
plogThe pool to allocate the logs from
ptempPool used for temporary allocations
s_mainThe main server
ap_piped_log_read_fd(pl);
A macro to access the read side of the piped log pipe

Parameters
plThe piped log structure
Return Value
The native file descriptor

ap_piped_log_read_fd(pl);
A macro to access the write side of the piped log pipe

Parameters
plThe piped log structure
Return Value
The native file descriptor

piped_log*ap_open_piped_log(apr_pool_t *p, const char *program);
Open the piped log process

Parameters
pThe pool to allocate out of
programThe program to run in the logging process
Return Value
The piped log structure

voidap_log_error(const char *file, int line, int level, apr_status_t status, const server_rec *s, const char *fmt, ...) ;
ap_log_error() - log messages which are not related to a particular request or connection. This uses a printf-like format to log messages to the error_log.

Use APLOG_MARK to fill out file and line @tip If a request_rec is available, use that with ap_log_rerror() in preference to calling this function. Otherwise, if a conn_rec is available, use that with ap_log_cerror() in preference to calling this function.

It is VERY IMPORTANT that you not include any raw data from the network, such as the request-URI or request header fields, within the format string. Doing so makes the server vulnerable to a denial-of-service attack and other messy behavior. Instead, use a simple format string like "%s", followed by the string containing the untrusted data.

Parameters
fileThe file in which this function is called
lineThe line number on which this function is called
levelThe level of this error message
statusThe status code from the previous command
sThe server on which we are logging
fmtThe format string ... The arguments to use to fill out fmt.
voidap_log_perror(const char *file, int line, int level, apr_status_t status, apr_pool_t *p, const char *fmt, ...) ;
ap_log_perror() - log messages which are not related to a particular request, connection, or virtual server. This uses a printf-like format to log messages to the error_log.

Use APLOG_MARK to fill out file and line

It is VERY IMPORTANT that you not include any raw data from the network, such as the request-URI or request header fields, within the format string. Doing so makes the server vulnerable to a denial-of-service attack and other messy behavior. Instead, use a simple format string like "%s", followed by the string containing the untrusted data.

Parameters
fileThe file in which this function is called
lineThe line number on which this function is called
levelThe level of this error message
statusThe status code from the previous command
pThe pool which we are logging for
fmtThe format string ... The arguments to use to fill out fmt.
voidap_log_rerror(const char *file, int line, int level, apr_status_t status, const request_rec *r, const char *fmt, ...);
ap_log_rerror() - log messages which are related to a particular request. This uses a a printf-like format to log messages to the error_log.

Use APLOG_MARK to fill out file and line

It is VERY IMPORTANT that you not include any raw data from the network, such as the request-URI or request header fields, within the format string. Doing so makes the server vulnerable to a denial-of-service attack and other messy behavior. Instead, use a simple format string like "%s", followed by the string containing the untrusted data.

Parameters
fileThe file in which this function is called
lineThe line number on which this function is called
levelThe level of this error message
statusThe status code from the previous command
rThe request which we are logging for
fmtThe format string ... The arguments to use to fill out fmt.
voidap_log_cerror(const char *file, int line, int level, apr_status_t status, const conn_rec *c, const char *fmt, ...);
ap_log_cerror() - log messages which are related to a particular connection. This uses a a printf-like format to log messages to the error_log.

Use APLOG_MARK to fill out file and line @tip If a request_rec is available, use that with ap_log_rerror() in preference to calling this function.

It is VERY IMPORTANT that you not include any raw data from the network, such as the request-URI or request header fields, within the format string. Doing so makes the server vulnerable to a denial-of-service attack and other messy behavior. Instead, use a simple format string like "%s", followed by the string containing the untrusted data. @note ap_log_cerror() is available starting with Apache 2.0.55.

Parameters
fileThe file in which this function is called
lineThe line number on which this function is called
levelThe level of this error message
statusThe status code from the previous command
cThe connection which we are logging for
fmtThe format string ... The arguments to use to fill out fmt.
voidap_error_log2stderr(server_rec *s);
Convert stderr to the error log

Parameters
sThe current server
voidap_close_piped_log(piped_log *pl);
Close the piped log and kill the logging process

Parameters
plThe piped log structure

© 2000 [Apache Software Foundation]
Generated by ScanDoc 0.14
Last Updated: Fri Apr 14 12:43:20 2006