1 /*
2  * This file is part of the zlog Library.
3  *
4  * Copyright (C) 2011 by Hardy Simpson <HardySimpson1984@gmail.com>
5  *
6  * Licensed under the LGPL v2.1, see the file COPYING in base directory.
7  */
8 
9 #ifndef __zlog_record_h
10 #define __zlog_record_h
11 
12 #include "zc_defs.h"
13 
14 /* record is user-defined output function and it's name from configure file */
15 typedef struct zlog_msg_s {
16 	char *buf;
17 	size_t len;
18 	char *path;
19 } zlog_msg_t; /* 3 of this first, see need thread or not later */
20 
21 typedef int (*zlog_record_fn)(zlog_msg_t * msg);
22 
23 typedef struct zlog_record_s {
24 	char name[MAXLEN_PATH + 1];
25 	zlog_record_fn output;
26 } zlog_record_t;
27 
28 zlog_record_t *zlog_record_new(const char *name, zlog_record_fn output);
29 void zlog_record_del(zlog_record_t *a_record);
30 void zlog_record_profile(zlog_record_t *a_record, int flag);
31 
32 #endif
33