Core: rethink where Logger is instantiated and what has access
Currently, the (singleton) logger is instantiated in Experiment.cpp
:
Experiment::Experiment(const std::string& name, const std::string& diffractometerName) : _name(name)
{
// start logging
Logger::instance().start(ohkl::kw_logFilename, Level::Info);
ohklLog(Level::Info, "Git branch ", GIT_BRANCH, " / commit hash ", COMMIT_HASH);
This is reasonable in one sense since when OpenHKL is called from the Python API, Experiment
will be the top level object. However, this does not make much sense in the context of the GUI, where there may be many experiments, each with there own logging data added to the stream with no reference of which experiment the output belongs to. This needs some more thought.
Moreover, there is currently no GUI logging. Is it necessary? If so, how should it be implemented?
Edited by Zamaan Raza