Skip to content

Commit

Permalink
Clarify log on initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAce committed Oct 12, 2021
1 parent d9afdca commit 37c7b0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/h5pp/details/h5ppFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ namespace h5pp {

void init() {
h5pp::logger::setLogger("h5pp|init", logLevel, logTimestamp);
h5pp::logger::log->debug("Initializing HDF5 file: [{}]", filePath.string());
h5pp::logger::log->debug("Accessing file: [{}]", filePath.string());

/* Set default error print output */
error_stack = H5Eget_current_stack();
herr_t turnOffAutomaticErrorPrinting = H5Eset_auto2(error_stack, nullptr, nullptr);
if(turnOffAutomaticErrorPrinting < 0) throw h5pp::runtime_error("Failed to turn off H5E error printing");

// The following function can modify the resulting filePath depending on permission.
filePath = h5pp::hdf5::createFile(filePath, permission, plists);
h5pp::logger::log->debug("Successfully initialized file [{}]", filePath.string());
}

public:
Expand Down

0 comments on commit 37c7b0c

Please sign in to comment.