1 /* @(#) $Id: ./src/headers/debug_op.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
14 /* Part of the OSSEC HIDS
15 * Available at http://www.ossec.net
18 /* Functions to generate debug/verbose/err reports.
19 * Right now, we have two debug levels: 1,2,
20 * a verbose mode and a error (merror) function.
21 * To see these messages, use the "-d","-v" options
22 * (or "-d" twice to see debug2). The merror is printed
23 * by default when an important error occur.
31 #define __attribute__(x)
34 void debug1(const char *msg,...) __attribute__((format(printf, 1, 2)));
36 void debug2(const char *msg,...) __attribute__((format(printf, 1, 2)));
38 void merror(const char *msg,...) __attribute__((format(printf, 1, 2)));
40 void verbose(const char *msg,...) __attribute__((format(printf, 1, 2)));
42 void print_out(const char *msg,...) __attribute__((format(printf, 1, 2)));
44 void log2file(const char * msg,... ) __attribute__((format(printf, 1, 2)));
46 void ErrorExit(const char *msg,...) __attribute__((format(printf, 1, 2)));
49 /* Use these three functions to set when you
50 * enter in debug, chroot or daemon mode
62 #define DEBUG_MSG(x,y,z) verbose(x,y,z)
64 #define DEBUG_MSG(x,y,z)
65 #endif /* end debug analysisd */