3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 2) as published by the FSF - Free Software
13 /* Part of the OSSEC HIDS
14 * Available at http://www.ossec.net
17 /* Functions to generate debug/verbose/err reports.
18 * Right now, we have two debug levels: 1,2,
19 * a verbose mode and a error (merror) function.
20 * To see these messages, use the "-d","-v" options
21 * (or "-d" twice to see debug2). The merror is printed
22 * by default when an important error occur.
30 #define __attribute__(x)
33 void debug1(const char *msg,...) __attribute__((format(printf, 1, 2)));
35 void debug2(const char *msg,...) __attribute__((format(printf, 1, 2)));
37 void merror(const char *msg,...) __attribute__((format(printf, 1, 2)));
39 void verbose(const char *msg,...) __attribute__((format(printf, 1, 2)));
41 void print_out(const char *msg,...) __attribute__((format(printf, 1, 2)));
43 void log2file(const char * msg,... ) __attribute__((format(printf, 1, 2)));
45 void ErrorExit(const char *msg,...) __attribute__((format(printf, 1, 2)));
48 /* Use these three functions to set when you
49 * enter in debug, chroot or daemon mode
61 #define DEBUG_MSG(x,y,z) verbose(x,y,z)
63 #define DEBUG_MSG(x,y,z)
64 #endif /* end debug analysisd */