diff --git a/package.json b/package.json index e3b71a76..9fd9960f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tvb-ext-xircuits", - "version": "2.0.1-alpha.2", + "version": "2.0.1-alpha.3", "description": "Jupyterlab extension for building TVB workflows in a visual and interactive manner", "keywords": [ "jupyter", diff --git a/pyproject.toml b/pyproject.toml index 6e8ac6dd..5d972c8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "tvb-ext-xircuits" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.8" -version = "2.0.1a2" +version = "2.0.1a3" classifiers = [ "Framework :: Jupyter", "Framework :: Jupyter :: JupyterLab", diff --git a/tvbextxircuits/logger/builder.py b/tvbextxircuits/logger/builder.py index 48a7017e..aac537a1 100644 --- a/tvbextxircuits/logger/builder.py +++ b/tvbextxircuits/logger/builder.py @@ -26,7 +26,11 @@ def __init__(self, config_file_name='logging.conf'): """ current_folder = os.path.dirname(inspect.getfile(self.__class__)) config_file_path = os.path.join(current_folder, config_file_name) - logging.config.fileConfig(config_file_path, disable_existing_loggers=False) + + home_directory = os.path.expanduser('~') + log_file_path = os.path.join(home_directory, '.tvb_ext_xircuits.log') + + logging.config.fileConfig(config_file_path, disable_existing_loggers=False, defaults={'logfilename': log_file_path}) self._loggers = weakref.WeakValueDictionary() def build_logger(self, parent_module): diff --git a/tvbextxircuits/logger/logging.conf b/tvbextxircuits/logger/logging.conf index 3e0e980a..2906fd97 100644 --- a/tvbextxircuits/logger/logging.conf +++ b/tvbextxircuits/logger/logging.conf @@ -38,7 +38,7 @@ args=(sys.stdout,) class=handlers.TimedRotatingFileHandler level=INFO formatter=simpleFormatter -args=('.tvb_ext_xircuits.log', 'midnight', 1, 30, None, False, False) +args=(r'%(logfilename)s', 'midnight', 1, 30, None, False, False) ############################################ ## Formatters ##