2 * iSCSI Safe Logging and Tracing Library
4 * Copyright (C) 2004 Dmitry Yusupov, Alex Aizman
5 * maintained by open-iscsi@googlegroups.com
7 * circular buffer code based on log.c from dm-multipath project
9 * heavily based on code from log.c:
10 * Copyright (C) 2002-2003 Ardis Technolgies <roman@ardistech.com>,
11 * licensed under the terms of the GNU GPL v2.0,
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published
15 * by the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * See the file COPYING included with this distribution for more details.
34 unsigned short int *array
;
35 struct seminfo
*__buf
;
39 #define DEFAULT_AREA_SIZE 16384
40 #define MAX_MSG_SIZE 256
42 extern int log_daemon
;
68 extern int log_init (char * progname
, int size
);
69 extern void log_close (pid_t pid
);
70 extern void dump_logmsg (void *);
71 extern void log_warning(const char *fmt
, ...)
72 __attribute__ ((format (printf
, 1, 2)));
73 extern void log_error(const char *fmt
, ...)
74 __attribute__ ((format (printf
, 1, 2)));
75 extern void log_debug(int level
, const char *fmt
, ...)
76 __attribute__ ((format (printf
, 2, 3)));