Open HealthyPear opened 3 years ago
just remember that if you use ctapipe Components and Tools as base classes, you get logging for free. That is the final goal in protopipe, so do not spend much time implementing anything fancy in protopipe.
import logging
logger = logging.getLogger(__name__)
...
logger.warning("this is bad")
2. use the logging levels (info, debug, warning) correctly
3. in any executable script you have now that does not use ctapipe's Tool/Component framework, add a line to set up the logger, like `logging.defaultConfig(level=INFO)` (don't worry too much about getting the format or making it user-configurable, that will come when you use ctapipe more).
A better goal would just be to convert protopipe scripts to use ctapipe.core.Tool, like what was recently done for lstchain
A better goal would just be to convert protopipe scripts to use ctapipe.core.Tool, like what was recently done for lstchain
this is part of the refactoring, but until it's completely done there are many prints here and there of course what is already logged from ctapipe and pyirf shows up already when launching protopipe's scripts
Both supporting libraries (ctapipe and pyirf) already provide a logging system that makes use of python's logging facility.
Even after the refactoring, there will be the need for a better login system of the pipeline, and having it available already in 0.4.0-dev would be nice.