root/src/json-lib/debug.h

Revision efa9375336eec306ede14a9a1032985a71482810, 1.4 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

refs #294 resmon no support arbitrary json objects

  • Property mode set to 100644
Line 
1 /*
2  * $Id: debug.h,v 1.5 2006/01/30 23:07:57 mclark Exp $
3  *
4  * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
5  * Michael Clark <michael@metaparadigm.com>
6  *
7  * This library is free software; you can redistribute it and/or modify
8  * it under the terms of the MIT license. See COPYING for details.
9  *
10  */
11
12 #ifndef _DEBUG_H_
13 #define _DEBUG_H_
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 extern void mc_set_debug(int debug);
20 extern int mc_get_debug(void);
21
22 extern void mc_set_syslog(int syslog);
23 extern void mc_abort(const char *msg, ...);
24 extern void mc_debug(const char *msg, ...);
25 extern void mc_error(const char *msg, ...);
26 extern void mc_info(const char *msg, ...);
27
28 #ifdef MC_MAINTAINER_MODE
29 #define MC_SET_DEBUG(x) mc_set_debug(x)
30 #define MC_GET_DEBUG() mc_get_debug()
31 #define MC_SET_SYSLOG(x) mc_set_syslog(x)
32 #define MC_ABORT(x, ...) mc_abort(x, ##__VA_ARGS__)
33 #define MC_DEBUG(x, ...) mc_debug(x, ##__VA_ARGS__)
34 #define MC_ERROR(x, ...) mc_error(x, ##__VA_ARGS__)
35 #define MC_INFO(x, ...) mc_info(x, ##__VA_ARGS__)
36 #else
37 #define MC_SET_DEBUG(x) if (0) mc_set_debug(x)
38 #define MC_GET_DEBUG() (0)
39 #define MC_SET_SYSLOG(x) if (0) mc_set_syslog(x)
40 #define MC_ABORT(x, ...) if (0) mc_abort(x, ##__VA_ARGS__)
41 #define MC_DEBUG(x, ...) if (0) mc_debug(x, ##__VA_ARGS__)
42 #define MC_ERROR(x, ...) if (0) mc_error(x, ##__VA_ARGS__)
43 #define MC_INFO(x, ...) if (0) mc_info(x, ##__VA_ARGS__)
44 #endif
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif
Note: See TracBrowser for help on using the browser.