]> mj.ucw.cz Git - libucw.git/blob - ucw/log-internal.h
API: Include tbf.h and trie.h
[libucw.git] / ucw / log-internal.h
1 /*
2  *      UCW Library -- Internals of Logging
3  *
4  *      (c) 1997--2009 Martin Mares <mj@ucw.cz>
5  *      (c) 2008 Tomas Gavenciak <gavento@ucw.cz>
6  *
7  *      This software may be freely distributed and used according to the terms
8  *      of the GNU Lesser General Public License.
9  */
10
11 #ifndef _UCW_LOG_INTERNAL_H_
12 #define _UCW_LOG_INTERNAL_H_
13
14 #ifdef CONFIG_UCW_CLEAN_ABI
15 #define log_pass_msg ucw_log_pass_msg
16 #define log_stream_default ucw_log_stream_default
17 #define log_streams ucw_log_streams
18 #define log_streams_after ucw_log_streams_after
19 #define log_type_names ucw_log_type_names
20 #endif
21
22 /*
23  * Pass a message to a stream.
24  * @depth prevents loops.
25  * Returns 1 in case of loop detection or other fatal error,
26  *         0 otherwise
27  */
28 int log_pass_msg(int depth, struct log_stream *ls, struct log_msg *m);
29
30 /* Define an array (growing buffer) for pointers to log_streams. */
31 #define GBUF_TYPE struct log_stream*
32 #define GBUF_PREFIX(x) lsbuf_##x
33 #include <ucw/gbuf.h>
34
35 extern struct lsbuf_t log_streams;
36 extern int log_streams_after;
37
38 extern struct log_stream log_stream_default;
39
40 extern char **log_type_names;
41
42 #endif