Commit b83d9cc8 authored by gsell's avatar gsell
Browse files

src/include/h5core/h5_log.h

- hh5_{warn,info,debug} are not static inline any more
parent 6ad9ae50
......@@ -144,40 +144,13 @@ h5_call_stack_reset (
return h5_call_stack.entry[0].name;
}
void
h5priv_vprintf (
FILE* f,
const char* prefix,
const char* __funcname,
const char* fmt,
va_list ap
);
h5_err_t
h5_error (
const h5_err_t error_no,
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
void
h5_verror (
const char* fmt,
va_list ap
);
/*!
\ingroup h5_core_errorhandling
Print a warning message to \c stderr.
Print a debug message to \c stdout.
*/
static inline h5_err_t
h5_warn (
void
h5_debug (
const char *fmt,
...
)
......@@ -185,27 +158,14 @@ h5_warn (
__attribute__ ((format (printf, 1, 2)))
#endif
;
static inline h5_err_t
h5_warn (
const char* fmt,
...
) {
if (h5_log_level >= 2) {
va_list ap;
va_start (ap, fmt);
h5priv_vprintf (stderr, "W", h5_get_funcname(), fmt, ap);
va_end (ap);
}
return H5_NOK;
}
/*!
\ingroup h5_core_errorhandling
Print an informational message to \c stdout.
Print a warning message to \c stderr.
*/
static inline void
h5_info (
h5_err_t
h5_warn (
const char *fmt,
...
)
......@@ -213,26 +173,14 @@ h5_info (
__attribute__ ((format (printf, 1, 2)))
#endif
;
static inline void
h5_info (
const char* fmt,
...
) {
if (h5_log_level >= 3) {
va_list ap;
va_start (ap, fmt);
h5priv_vprintf (stdout, "I", h5_get_funcname(), fmt, ap);
va_end (ap);
}
}
/*!
\ingroup h5_core_errorhandling
Print a debug message to \c stdout.
Print an informational message to \c stdout.
*/
static inline void
h5_debug (
void
h5_info (
const char *fmt,
...
)
......@@ -241,23 +189,6 @@ __attribute__ ((format (printf, 1, 2)))
#endif
;
static inline void
h5_debug (
const char *fmt,
...
) {
if (h5_log_level >= 4) {
char prefix[1024];
snprintf (prefix, sizeof(prefix), "%*s %s",
h5_call_stack_get_level(), "",
h5_call_stack_get_name());
va_list ap;
va_start (ap, fmt);
h5priv_vprintf (stdout, "D", prefix, fmt, ap);
va_end (ap);
}
}
//////////////////////////////////////////////////////////////////////////////
// function enter macro
#if defined(NDEBUG)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment