log.c revision 9fe315e66ef597a158db81bcbd230d7a5d65785d
* Apache Software Foundation (http://www.apache.org/)."
* http_log.c: Dealing with the logs and errors
#include "apr.h"
#include "apr_strings.h"
#include "apr_errno.h"
#include "apr_thread_proc.h"
#include "apr_lib.h"
#include "apr_signal.h"
#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#include "apr_want.h"
#include <stdarg.h>
#include <unistd.h>
#define CORE_PRIVATE
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_main.h"
#include "util_time.h"
#include "ap_mpm.h"
char *t_name;
int t_val;
} TRANS;
#ifdef HAVE_SYSLOG
#ifdef LOG_AUTHPRIV
#ifdef LOG_CRON
#ifdef LOG_DAEMON
#ifdef LOG_FTP
#ifdef LOG_KERN
#ifdef LOG_LPR
#ifdef LOG_MAIL
#ifdef LOG_NEWS
#ifdef LOG_SYSLOG
#ifdef LOG_USER
#ifdef LOG_UUCP
#ifdef LOG_LOCAL0
#ifdef LOG_LOCAL1
#ifdef LOG_LOCAL2
#ifdef LOG_LOCAL3
#ifdef LOG_LOCAL4
#ifdef LOG_LOCAL5
#ifdef LOG_LOCAL6
#ifdef LOG_LOCAL7
const char *fname)
if (!filename) {
fname);
return APR_EBADPATH;
return rc;
return rc;
const char *description)
char **args;
const char *pname;
return rc;
const char *fname;
int rc;
return DONE;
#ifdef HAVE_SYSLOG
fname++;
return OK;
if (!fname) {
return DONE;
return DONE;
return OK;
int replace_stderr;
return DONE;
replace_stderr = 0;
if (q == virt) {
return DONE;
return OK;
#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
const char *referer;
if (s == NULL) {
else if (s->error_log) {
#ifdef TPF
else if (tpf_child) {
len = 0;
#ifndef TPF
#ifdef WIN32
if (r && r->connection) {
if (status != 0) {
#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
if (logf) {
#ifdef HAVE_SYSLOG
const char *fmt, ...)
const char *fmt, ...)
const char *fmt, ...)
args)));
const char *fname;
if (!filename) {
if (!fname) {
fname));
!= APR_SUCCESS) {
const char *fname;
if (!filename) {
return APR_EGENERAL;
if (!fname) {
return APR_EGENERAL;
return rv;
return rv;
return APR_EGENERAL;
return APR_SUCCESS;
int nLine)
#if defined(WIN32)
DebugBreak();
abort();
#ifdef AP_HAVE_RELIABLE_PIPED_LOGS
int rc = 0;
!= APR_SUCCESS) ||
!= APR_SUCCESS) ||
char **args;
const char *pname;
return rc;
int mpm_state;
switch (reason) {
case APR_OC_REASON_DEATH:
case APR_OC_REASON_LOST:
case APR_OC_REASON_UNWRITABLE:
case APR_OC_REASON_RESTART:
case APR_OC_REASON_UNREGISTER:
return APR_SUCCESS;
pl->p = p;
return NULL;
return NULL;
return pl;
return APR_SUCCESS;
int rc;
return NULL;
pl->p = p;
return pl;