Skip to content
Snippets Groups Projects
Commit 70d7da5e authored by dmt's avatar dmt
Browse files

Read logging settings during cml import.

parent 0a61690a
No related branches found
No related tags found
No related merge requests found
from cml.controller import load_settings
from cml.controller import get_data_source
from cml.controller import construction
from cml.controller import feature_selection
from cml.controller import reconstruction
from cml.controller import search_knowledge
# TODO (dmt): Load default settings automatically.
# configure logging levels
from logging import addLevelName, Logger, config
from os.path import join, abspath
from inspect import getsourcefile
def _setup_loggers():
protocol_level = 55
addLevelName(protocol_level, "PROTOCOL")
def protocol(self, message, *args, **kwargs):
if self.isEnabledFor(protocol_level):
self._log(protocol_level, message, args, **kwargs)
Logger.protocol = protocol
logging_config = join(abspath(getsourcefile(lambda: None))[:-11],
"static/logging.ini")
config.fileConfig(logging_config)
_setup_loggers()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment