32 #define MAX_LOG_FILE_SIZE (8 * 1024 * 1024)
34 #define MAX_LOG_FILE_COUNT 100
40 #define APT_LOG_MARK_DECLARE(LOG_SOURCE) LOG_SOURCE,__FILE__,__LINE__
43 #define APT_LOG_SOURCE_DECLARE(SCOPE,LOG_SOURCE) \
44 extern apt_log_source_t *LOG_SOURCE; \
45 SCOPE##_DECLARE(void) LOG_SOURCE##_init();
48 #define APT_LOG_SOURCE_IMPLEMENT(SCOPE, LOG_SOURCE, LOG_SOURCE_TAG) \
49 apt_log_source_t *LOG_SOURCE = &def_log_source; \
50 SCOPE##_DECLARE(void) LOG_SOURCE##_init() {apt_log_source_assign(LOG_SOURCE_TAG,&LOG_SOURCE);}
55 #define APT_LOG_MARK APT_LOG_MARK_DECLARE(&def_log_source)
65 #if defined(WIN32) && APR_SIZEOF_VOIDP == 8
67 #define APT_PTR_FMT "0x%I64x"
70 #define APT_PTR_FMT "0x%lx"
73 #define APT_SID_FMT "<%s>"
75 #define APT_SIDRES_FMT "<%s@%s>"
77 #define APT_PTRSID_FMT APT_PTR_FMT " " APT_SID_FMT
79 #define APT_NAMESID_FMT "%s " APT_SID_FMT
81 #define APT_NAMESIDRES_FMT "%s " APT_SIDRES_FMT
129 const char *format, va_list arg_ptr);
185 const
char *dir_path,
186 const
char *file_name,
187 apr_size_t max_file_size,
188 apr_size_t max_file_count,
Definition: apt_log.h:118
apt_bool_t apt_log_instance_set(apt_logger_t *logger)
apt_bool_t apt_log(apt_log_source_t *log_source, const char *file, int line, apt_log_priority_e priority, const char *format,...)
#define APT_END_EXTERN_C
Definition: apt.h:38
Definition: apt_log.h:100
int apt_bool_t
Definition: apt.h:57
Definition: apt_log.h:112
apt_bool_t apt_log_priority_set(apt_log_priority_e priority)
Definition: apt_log.h:102
apt_log_masking_e
Definition: apt_log.h:117
Definition: apt_log.h:113
apt_bool_t apt_log_file_close(void)
apt_log_header_e
Definition: apt_log.h:98
int apt_log_output_mode_translate(char *str)
apt_bool_t apt_log_instance_destroy(void)
void apt_def_log_source_set(apt_log_source_t *log_source)
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apt_bool_t apt_log_header_set(int header)
Definition: apt_log.h:111
#define APT_DECLARE(type)
Definition: apt.h:53
apt_bool_t apt_va_log(apt_log_source_t *log_source, const char *file, int line, apt_log_priority_e priority, const char *format, va_list arg_ptr)
apt_bool_t apt_log_output_mode_set(apt_log_output_e mode)
apt_log_source_t def_log_source
apt_bool_t(* apt_log_ext_handler_f)(const char *file, int line, const char *obj, apt_log_priority_e priority, const char *format, va_list arg_ptr)
Definition: apt_log.h:127
struct apt_log_source_t apt_log_source_t
Definition: apt_log.h:37
apt_bool_t apt_log_source_assign(const char *name, apt_log_source_t **log_source)
apt_bool_t apt_obj_log(apt_log_source_t *log_source, const char *file, int line, apt_log_priority_e priority, void *obj, const char *format,...)
apt_bool_t apt_log_file_open(const char *dir_path, const char *file_name, apr_size_t max_file_size, apr_size_t max_file_count, apt_bool_t append, apr_pool_t *pool)
apt_bool_t apt_log_instance_load(const char *config_file, apr_pool_t *pool)
apt_log_masking_e apt_log_masking_translate(const char *str)
apt_log_priority_e apt_log_priority_translate(const char *str)
apt_logger_t * apt_log_instance_get(void)
Definition: apt_log.h:103
Definition: apt_log.h:104
int apt_log_header_translate(char *str)
apt_bool_t apt_log_ext_handler_set(apt_log_ext_handler_f handler)
apt_bool_t apt_log_instance_create(apt_log_output_e mode, apt_log_priority_e priority, apr_pool_t *pool)
Definition: apt_log.h:119
struct apt_logger_t apt_logger_t
Definition: apt_log.h:124
apt_bool_t apt_log_output_mode_check(apt_log_output_e mode)
const char * apt_log_data_mask(const char *data_in, apr_size_t *length, apr_pool_t *pool)
apt_log_output_e
Definition: apt_log.h:110
Definition: apt_log.h:120
Definition: apt_log.h:101
apt_bool_t apt_log_masking_set(apt_log_masking_e masking)
apt_log_masking_e apt_log_masking_get(void)
apt_log_priority_e
Definition: apt_log.h:84