Apache2
md_log.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef mod_md_md_log_h
18 #define mod_md_md_log_h
19 
20 typedef enum {
38 
39 #define MD_LOG_MARK __FILE__,__LINE__
40 
41 #ifndef APLOGNO
42 #define APLOGNO(n) "AH" #n ": "
43 #endif
44 
45 const char *md_log_level_name(md_log_level_t level);
46 
48 
49 void md_log_perror(const char *file, int line, md_log_level_t level,
50  apr_status_t rv, apr_pool_t *p, const char *fmt, ...)
51  __attribute__((format(printf,6,7)));
52 
53 typedef int md_log_level_cb(void *baton, apr_pool_t *p, md_log_level_t level);
54 
55 typedef void md_log_print_cb(const char *file, int line, md_log_level_t level,
56  apr_status_t rv, void *baton, apr_pool_t *p, const char *fmt, va_list ap);
57 
58 void md_log_set(md_log_level_cb *level_cb, md_log_print_cb *print_cb, void *baton);
59 
60 #endif /* md_log_h */
int apr_status_t
Definition: apr_errno.h:44
#define __attribute__(__x)
Definition: apr.h:63
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
void md_log_set(md_log_level_cb *level_cb, md_log_print_cb *print_cb, void *baton)
int md_log_is_level(apr_pool_t *p, md_log_level_t level)
void typedef int md_log_level_cb(void *baton, apr_pool_t *p, md_log_level_t level)
const char * md_log_level_name(md_log_level_t level)
void md_log_perror(const char *file, int line, md_log_level_t level, apr_status_t rv, apr_pool_t *p, const char *fmt,...) __attribute__((format(printf
void md_log_print_cb(const char *file, int line, md_log_level_t level, apr_status_t rv, void *baton, apr_pool_t *p, const char *fmt, va_list ap)
Definition: md_log.h:55
md_log_level_t
Definition: md_log.h:20
@ MD_LOG_TRACE2
Definition: md_log.h:30
@ MD_LOG_TRACE8
Definition: md_log.h:36
@ MD_LOG_NOTICE
Definition: md_log.h:26
@ MD_LOG_ALERT
Definition: md_log.h:22
@ MD_LOG_TRACE1
Definition: md_log.h:29
@ MD_LOG_TRACE4
Definition: md_log.h:32
@ MD_LOG_ERR
Definition: md_log.h:24
@ MD_LOG_WARNING
Definition: md_log.h:25
@ MD_LOG_TRACE3
Definition: md_log.h:31
@ MD_LOG_TRACE7
Definition: md_log.h:35
@ MD_LOG_TRACE5
Definition: md_log.h:33
@ MD_LOG_DEBUG
Definition: md_log.h:28
@ MD_LOG_EMERG
Definition: md_log.h:21
@ MD_LOG_CRIT
Definition: md_log.h:23
@ MD_LOG_INFO
Definition: md_log.h:27
@ MD_LOG_TRACE6
Definition: md_log.h:34
apr_pool_t * p