-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional debugging output for AbstractIOHandlerImpl::flush() #1495
Conversation
35e8534
to
338e922
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Since it is not performance critical, one could also consider controlling this with an environment option (verbosity).
That way, no recompile needs to be done.
338e922
to
4e1535b
Compare
I had not added that because of our plans to introduce proper logging at some point, but adding an environment variable is probably a good idea. This way, we can easily ask users to give us more details in bug reports without recompiling anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you!
* dev: Fix CMake: HDF5 Libs are PUBLIC (openPMD#1520) Fix `chmod` in `download_samples.sh` (openPMD#1518) CI: Old CTest (openPMD#1519) Python: Fix ODR Violation (openPMD#1521) replace extent in weighting and displacement (openPMD#1510) CMake: Warn and Continue on Empty HDF5_VERSION (openPMD#1512) Replace openPMD_Datatypes global with function (openPMD#1509) Streaming examples: Set WAN as default transport (openPMD#1511) TOML Backend (openPMD#1436) make it possible to manually set chunks when loading dask arrays (openPMD#1477) [pre-commit.ci] pre-commit autoupdate (openPMD#1504) Optional debugging output for AbstractIOHandlerImpl::flush() (openPMD#1495) Python: 3.8+ (openPMD#1502) # Conflicts: # .github/workflows/linux.yml # src/binding/python/Series.cpp
I've used something like this probably a hundred times already, this PR puts debugging output (disabled by default) for the backend IO tasks into
AbstractIOHandlerImpl::flush()
.To be enabled by manually putting a
#define OPENPMD_DEBUG 1
in the corresponding.cpp
file.This can be seen as a first step toward proper debug logging that users can enable e.g. via an environment variable.
Sample output: