1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
10 /* Functions to generate debug/verbose/err reports
12 * We have two debug levels (1 and 2), a verbose mode and an error function
14 * To see these messages, use the "-d","-v" options (or "-d" twice to see debug2)
15 * The merror is printed by default when an important error occurs
22 #define __attribute__(x)
25 void debug1(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
26 void debug2(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
27 void merror(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
28 void verbose(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
29 void print_out(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
30 void log2file(const char *msg, ... ) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
31 void ErrorExit(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)) __attribute__ ((noreturn));
33 /* Use these three functions to set when you
34 * enter in debug, chroot or daemon mode
44 #define DEBUG_MSG(x,y,z) verbose(x,y,z)
46 #define DEBUG_MSG(x,y,z)
47 #endif /* end debug analysisd */
49 #endif /* __DEBUG_H */