ESAPI-C 1.0
The OWASP Enterprise Security API for C
|
00001 00065 #include <stdlib.h> 00066 #include "log4c.h" 00067 #include "user.h" 00068 00069 #ifndef _LOG_H_ 00070 #define _LOG_H_ 00071 00072 #ifndef DEFAULT_LOG_CATEGORY_NAME 00073 #define DEFAULT_LOG_CATEGORY_NAME "root" 00074 #endif 00075 00076 #define SECURITY_LOG_PREFIX "SECURITY:" 00077 #define MAX_MESSAGE_LEN 256 00078 00079 enum EVENT_TYPE { 00080 SECURITY_SUCCESS, SECURITY_FAILURE, EVENT_SUCCESS, EVENT_FAILURE 00081 }; 00082 00083 extern char *eventTypeNames[]; 00084 00088 extern int esapi_open_log(); 00089 00093 extern int esapi_close_log(); 00094 00098 extern void esapi_log_trace(const user *, int, const char *, ...); 00099 00103 extern void esapi_log_debug(const user *, int, const char *, ...); 00104 00108 extern void esapi_log_info(const user *, int, const char *, ...); 00109 00113 extern void esapi_log_warn(const user *, int, const char *, ...); 00114 00118 extern void esapi_log_error(const user *, int, const char *, ...); 00119 00123 extern void esapi_log_critical(const user *, int, const char *, ...); 00124 00128 extern void esapi_log_fatal(const user *, int, const char *, ...); 00129 00130 #endif /* _LOG_H_ */