HTTP

xiaoxiao2021-04-03  231

#ifndef apache_http_log_h # define apache_http_log_h

#ifdef __cplusplusextern "c" {#ENDIF

#ifdef Have_syslog # include

#define APLOG_EMERG LOG_EMERG / * system is unusable * / # define APLOG_ALERT LOG_ALERT / * action must be taken immediately * / # define APLOG_CRIT LOG_CRIT / * critical conditions * / # define APLOG_ERR LOG_ERR / * error conditions * / # define APLOG_WARNING LOG_WARNING / * WARNING CONDitions * / # define aplog_notice log_notice / * normal but signific Condition * / # define aplog_info log_info / * informational * / # define aplog_debug_debug / * debug-level messages * /

#define aplog_levelmask log_primask / * Mask Off The Level Value * /

#ELSE

#define APLOG_EMERG 0 / * system is unusable * / # define APLOG_ALERT 1 / * action must be taken immediately * / # define APLOG_CRIT 2 / * critical conditions * / # define APLOG_ERR 3 / * error conditions * / # define APLOG_WARNING 4 / * WARNING CONDitions * / # define aplog_notice 5 / * Normal but signfect Condition * / # define aplog_info 6 / * informational * / # define aplog_debug 7 / * debug-level message * /

#define aplog_levelmask 7 / * Mask Off The Level Value * /

#ENDIF

#define APLOG_NOERRNO (APLOG_LEVELMASK 1) #ifdef WIN32 / * Set to indicate that error msg should come from Win32's GetLastError (), * not errno. * / # define APLOG_WIN32ERROR ((APLOG_LEVELMASK 1) * 2) #endif

#ifndef default_loglevel # define default_loglevel aplog_warning # Endif

#define aplog_mark __file __, __ line__

Void ap_open_logs (server_rec *, pool * p); API_EXPORT (VOID) AP_LOG_ERROR (Const Char * file, int line, int level, const server_rec * s, const char * fmt, ...) __ATTRIBUTE __ ((Format (Printf, 5 , 6)); API_EXPORT (VOID) AP_LOG_RERROR (Const Char * file, int line, int level, const request_rec * s, const char * fmt, ...) __ATtribute __ ((Format (Printf, 5, 6)))) ; API_EXPORT (void) ap_error_log2stderr (server_rec *); void ap_log_pid (pool * p, char * fname);. / * These are for legacy code, new code should use ap_log_error, * or ap_log_rerror * / API_EXPORT (void) ap_log_error_old (const char * err, server_rec * s); API_EXPORT (void) ap_log_unixerr (const char * routine, const char * file, const char * msg, server_rec * s); API_EXPORT (void) ap_log_printf (const server_rec * s, const char * fmt , ...) __ATTRIBUTE __ ((Format (Printf, 2, 3)))); API_EXPORT (VOID) AP_LOG_REASON (Const Char * REASON, Const Char * FNAME, Request_Rec * R);

Typedef struct piped_log {pool * p; #ifndef no_reliable_piped_logs char * program; int pid; int fds [2]; # else file * write_f; #endif} piped_log;

API_EXPORT (piped_log *) ap_open_piped_log (pool * p, const char * program); API_EXPORT (void) ap_close_piped_log (piped_log *); # ifndef NO_RELIABLE_PIPED_LOGS # define ap_piped_log_read_fd (pl) ((pl) -> fds [0]) # define ap_piped_log_write_fd (PL) ((PL) -> fds [1]) # Else # define ap_piped_log_read_fd (pl) (-1) #define ap_piped_log_write_fd (pl) (Fileno ((PL) -> Write_F)) # ENDIF

#ifdef __cplusplus} #ENDIF

#ndif / *! Apache_http_log_h * / This file defines the API function of the log file.

转载请注明原文地址:https://www.9cbs.com/read-131474.html

New Post(0)