kassonlab / gmxapi

(outdated) fork of https://gitlab.com/gromacs/gromacs
http://gmxapi.org/
Other
52 stars 13 forks source link

Need Context-dependent messaging facility #135

Open eirrgang opened 6 years ago

eirrgang commented 6 years ago

We desperately need a uniform facility to allow status message handling to be configured at a high level and to register handlers down into Sessions and API operations.

There is the potential for confusion about what "logging" is. Some common tools use "logging" to refer to status messages issued by code to be caught by an appropriate handler at different "levels", such as CRITICAL, WARN, STATUS, INFO, DEBUG. This should be distinguished from a facility for producing a record or artifact as a deliverable. I think it is helpful to adopt a convention of referring to configurable message handling as "message" and reserve "log" to refer to formulaic, deterministic output that might have stricter policies attached.

At the Python level, we would like the facility to be compatible with the logging module of Python. For starters, we can make a simple C++ adapter that we can pass through the Session to underlying code.

Some policy discussion is appropriate regarding messages across simulation ranks or MPI ranks.

eirrgang commented 6 years ago

We also need to think about the user-facing part of this. The way we currently configure the Python logging facility is pretty awkward.