NEP
4.3.0
NetCDF Expansion Pack
Loading...
Searching...
No Matches
include
nep_logging.h
Go to the documentation of this file.
1
19
#ifndef NEP_LOGGING_H
20
#define NEP_LOGGING_H
21
22
#include <stdlib.h>
23
#include <assert.h>
24
26
#define NEP_TURN_OFF_LOGGING -1
27
29
#define NEP_DEFAULT_LOG_LEVEL -1
30
31
#ifdef NEP_LOGGING
32
33
/* Implemented in src/nep.c (the core NEP library). */
34
void
nep_log(
int
severity,
const
char
*fmt, ...);
35
37
#define ELOG(e) nep_log e
38
43
#define EBAILLOG(e) \
44
do { \
45
ELOG((0, "file %s, line %d.\n%s", __FILE__, __LINE__, nc_strerror(e))); \
46
} while (0)
47
52
#define EBAIL_QUIET(e) \
53
do { \
54
retval = e; \
55
goto exit; \
56
} while (0)
57
58
#else
/* NEP_LOGGING */
59
61
#define ELOG(e)
62
64
#define EBAILLOG(e) \
65
do { \
66
} while (0)
67
72
#define EBAIL_QUIET EBAIL
73
74
#endif
/* NEP_LOGGING */
75
80
#define EBAIL(e) \
81
do { \
82
EBAILLOG(e); \
83
retval = e; \
84
goto exit; \
85
} while (0)
86
87
#endif
/* NEP_LOGGING_H */
Generated on
for NEP by
1.15.0