]> mj.ucw.cz Git - moe.git/blob - ucw/log-internal.h
Merge branch 'layout'
[moe.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 /*
15  * Pass a message to a stream.
16  * @depth prevents loops.
17  * Returns 1 in case of loop detection or other fatal error,
18  *         0 otherwise
19  */
20 int log_pass_msg(int depth, struct log_stream *ls, struct log_msg *m);
21
22 /* Define an array (growing buffer) for pointers to log_streams. */
23 #define GBUF_TYPE struct log_stream*
24 #define GBUF_PREFIX(x) lsbuf_##x
25 #include "ucw/gbuf.h"
26
27 extern struct lsbuf_t log_streams;
28 extern int log_streams_after;
29
30 extern struct log_stream log_stream_default;
31
32 extern char **log_type_names;
33
34 #endif