LAL 7.6.0.1-ef4fb44
LALDebugLevel.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2013 Jolien Creighton, Kipp Cannon
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#ifndef _LALDEBUGLEVEL_H
21#define _LALDEBUGLEVEL_H
22
23#ifdef __cplusplus
24extern "C" {
25#elif 0
26} /* so that editors will match preceding brace */
27#endif
28
29/** \addtogroup LALDebugLevel_h */ /** @{ */
30
31/** lalDebugLevel bit field values */
32enum {
33 LALERRORBIT = 0001, /**< enable error messages */
34 LALWARNINGBIT = 0002, /**< enable warning messages */
35 LALINFOBIT = 0004, /**< enable info messages */
36 LALTRACEBIT = 0010, /**< enable tracing messages */
37 LALMEMDBGBIT = 0020, /**< enable memory debugging routines */
38 LALMEMPADBIT = 0040, /**< enable memory padding */
39 LALMEMTRKBIT = 0100, /**< enable memory tracking */
40 LALMEMINFOBIT = 0200 /**< enable memory info messages */
41};
42
43/** composite lalDebugLevel values */
44enum {
45 LALNDEBUG = 0, /**< no debug */
46 LALERROR = LALERRORBIT, /**< enable error messages */
47 LALWARNING = LALWARNINGBIT, /**< enable warning messages */
48 LALINFO = LALINFOBIT, /**< enable info messages */
49 LALTRACE = LALTRACEBIT, /**< enable tracing messages */
50 LALMSGLVL1 = LALERRORBIT, /**< enable error messages */
51 LALMSGLVL2 = LALERRORBIT | LALWARNINGBIT, /**< enable error and warning messages */
52 LALMSGLVL3 = LALERRORBIT | LALWARNINGBIT | LALINFOBIT, /**< enable error, warning, and info messages */
53 LALMEMDBG = LALMEMDBGBIT | LALMEMPADBIT | LALMEMTRKBIT, /**< enable memory debugging tools */
54 LALMEMTRACE = LALTRACEBIT | LALMEMDBG | LALMEMINFOBIT, /**< enable memory tracing tools */
55 LALALLDBG = ~LALNDEBUG /**< enable all debugging */
56};
57
58#define lalDebugLevel (XLALGetDebugLevel())
59int XLALGetDebugLevel(void);
60void XLALClobberDebugLevel(int level);
61
62/** @} */
63
64#if 0
65{ /* so that editors will match succeeding brace */
66#elif defined(__cplusplus)
67}
68#endif
69#endif /* _LALDEBUGLEVEL_H */
void XLALClobberDebugLevel(int level)
Definition: LALDebugLevel.c:54
int XLALGetDebugLevel(void)
@ LALTRACE
enable tracing messages
Definition: LALDebugLevel.h:49
@ LALINFO
enable info messages
Definition: LALDebugLevel.h:48
@ LALMEMTRACE
enable memory tracing tools
Definition: LALDebugLevel.h:54
@ LALERROR
enable error messages
Definition: LALDebugLevel.h:46
@ LALWARNING
enable warning messages
Definition: LALDebugLevel.h:47
@ LALNDEBUG
no debug
Definition: LALDebugLevel.h:45
@ LALMEMDBG
enable memory debugging tools
Definition: LALDebugLevel.h:53
@ LALMSGLVL2
enable error and warning messages
Definition: LALDebugLevel.h:51
@ LALMSGLVL1
enable error messages
Definition: LALDebugLevel.h:50
@ LALMSGLVL3
enable error, warning, and info messages
Definition: LALDebugLevel.h:52
@ LALALLDBG
enable all debugging
Definition: LALDebugLevel.h:55
@ LALERRORBIT
enable error messages
Definition: LALDebugLevel.h:33
@ LALWARNINGBIT
enable warning messages
Definition: LALDebugLevel.h:34
@ LALMEMINFOBIT
enable memory info messages
Definition: LALDebugLevel.h:40
@ LALINFOBIT
enable info messages
Definition: LALDebugLevel.h:35
@ LALMEMPADBIT
enable memory padding
Definition: LALDebugLevel.h:38
@ LALTRACEBIT
enable tracing messages
Definition: LALDebugLevel.h:36
@ LALMEMTRKBIT
enable memory tracking
Definition: LALDebugLevel.h:39
@ LALMEMDBGBIT
enable memory debugging routines
Definition: LALDebugLevel.h:37