Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Logging

Anna Nelles edited this page Jan 24, 2020 · 2 revisions

Logging

Every module MODULE should have in the init function the initalization of a logger with

self.logger = logging.getLogger('NuRadioReco.MODULE')

This expects that the script containing the module sequence initalized a general logger with

import logging

from NuRadioReco.modules.base import module

logger = module.setup_logger(level=logging.WARNING)

This initalizes a parent logger, which determines the overall logging level that is inherited by all modules. This allows to turn DEBUG on for all, for example. It is still possible to change the logging level for individual modules as an overwrite.

Clone this wiki locally