From e0f92efaa2e2e0f042e5a3c9ee08c83c13ed0fc9 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Thu, 24 May 2018 14:55:34 -0600 Subject: [PATCH] fixed logging --- libhdf5/hdf5internal.c | 2 +- libsrc4/nc4internal.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libhdf5/hdf5internal.c b/libhdf5/hdf5internal.c index ccc27b3a2..806b3d278 100644 --- a/libhdf5/hdf5internal.c +++ b/libhdf5/hdf5internal.c @@ -48,7 +48,7 @@ extern float nc4_chunk_cache_preemption; /* This is the severity level of messages which will be logged. Use severity 0 for errors, 1 for important log messages, 2 for less important, etc. */ -int nc_log_level = NC_TURN_OFF_LOGGING; +extern int nc_log_level; #endif /* LOGGING */ diff --git a/libsrc4/nc4internal.c b/libsrc4/nc4internal.c index c355de713..bbaebad43 100644 --- a/libsrc4/nc4internal.c +++ b/libsrc4/nc4internal.c @@ -1596,23 +1596,23 @@ nc_set_log_level(int new_level) if(!nc4_hdf5_initialized) nc4_hdf5_initialize(); - /* If the user wants to completely turn off logging, turn off HDF5 - logging too. Now I truly can't think of what to do if this - fails, so just ignore the return code. */ - if (new_level == NC_TURN_OFF_LOGGING) - { - set_auto(NULL,NULL); - LOG((1, "HDF5 error messages turned off!")); - } + /* /\* If the user wants to completely turn off logging, turn off HDF5 */ + /* logging too. Now I truly can't think of what to do if this */ + /* fails, so just ignore the return code. *\/ */ + /* if (new_level == NC_TURN_OFF_LOGGING) */ + /* { */ + /* set_auto(NULL,NULL); */ + /* LOG((1, "HDF5 error messages turned off!")); */ + /* } */ - /* Do we need to turn HDF5 logging back on? */ - if (new_level > NC_TURN_OFF_LOGGING && - nc_log_level <= NC_TURN_OFF_LOGGING) - { - if (set_auto((H5E_auto_t)&H5Eprint, stderr) < 0) - LOG((0, "H5Eset_auto failed!")); - LOG((1, "HDF5 error messages turned on.")); - } + /* /\* Do we need to turn HDF5 logging back on? *\/ */ + /* if (new_level > NC_TURN_OFF_LOGGING && */ + /* nc_log_level <= NC_TURN_OFF_LOGGING) */ + /* { */ + /* if (set_auto((H5E_auto_t)&H5Eprint, stderr) < 0) */ + /* LOG((0, "H5Eset_auto failed!")); */ + /* LOG((1, "HDF5 error messages turned on.")); */ + /* } */ /* Now remember the new level. */ nc_log_level = new_level;