removed some useless output
[k8muffin.git] / src / libdbg / dbglog.h
blobc058d39c8f0185c5be069ec28b605cbcfb7323a7
1 /* Understanding is not required. Only obedience.
3 * This program is free software. It comes without any warranty, to
4 * the extent permitted by applicable law. You can redistribute it
5 * and/or modify it under the terms of the Do What The Fuck You Want
6 * To Public License, Version 2, as published by Sam Hocevar. See
7 * http://sam.zoy.org/wtfpl/COPYING for more details. */
8 /* debug logs */
9 #ifndef _DBGLOG_H_
10 #define _DBGLOG_H_
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
16 #include <stdarg.h>
18 /*#define NO_DEBUG_LOG*/
21 typedef void (*DbgLogUpdateFn) (void);
22 extern DbgLogUpdateFn dbgLogPostUpdate;
23 extern DbgLogUpdateFn dbgLogPreUpdate;
26 #define DBGLOG_CONSTRUCTOR_PRIO (555)
29 /* defaults: write to file; don't write to stderr */
31 extern void dbglog_set_filename (const char *fname);
32 extern int dbglog_set_screenout (int doIt);
33 extern int dbglog_set_fileout (int doIt);
34 #ifndef NO_DEBUG_LOG
35 extern void dlogf (const char *fmt, ...) __attribute__((format(printf, 1, 2)));
36 extern void dlogfVA (const char *fmt, va_list ap);
37 #else
38 # define dlogf(fmt,...) (void(0))
39 # define dlogfVA(fmt,ap) (void(0))
40 #endif
43 #ifdef __cplusplus
45 #endif
46 #endif