diff --git a/notebooks/Spz_Method_Speed_Test.ipynb b/notebooks/Spz_Method_Speed_Test.ipynb index fdfd1ea..525df26 100644 --- a/notebooks/Spz_Method_Speed_Test.ipynb +++ b/notebooks/Spz_Method_Speed_Test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "edacfdd9-6a75-4936-a22f-60f7ecc81c7e", "metadata": {}, "outputs": [], @@ -25,13 +25,12 @@ " get_data_for_target,\\\n", " FILE_DATE_FMT,\\\n", " generate_csv_contents,\\\n", - " generate_csv_contents_spz,\\\n", - " log" + " generate_csv_contents_spz" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "65ed1f94-a88d-40e3-a061-47e5af065aba", "metadata": {}, "outputs": [ @@ -3723,7 +3722,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "b2764a65-b9e9-43c7-8335-9a2ad2a90c8a", "metadata": {}, "outputs": [ @@ -7416,7 +7415,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "cd34c1c8-b30e-4cdb-ae32-66e5de092c4f", "metadata": {}, "outputs": [ @@ -7462,14 +7461,6 @@ " _df = amda.get_data(_id, start, stop).to_dataframe()\n", " print(_df.size)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3a210e72-5197-4678-bbbc-f4690e36a35d", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/web/run.py b/web/run.py index 92f9046..c56ab03 100755 --- a/web/run.py +++ b/web/run.py @@ -74,17 +74,31 @@ LOG_FILE = get_path('run.log') hp_logger = logging.getLogger("HelioPropa") hp_logger.setLevel(logging.DEBUG) -logHandler = logging.FileHandler(LOG_FILE) -logHandler.setFormatter(logging.Formatter( - "%(asctime)s - %(levelname)s - %(message)s" +fileHandler = logging.FileHandler(LOG_FILE) +fileHandler.setFormatter(logging.Formatter( + "%(asctime)s - %(levelname)s - %(message)s" )) # set file messages depending on env var setting if DEBUG: - logHandler.setLevel(logging.DEBUG) + fileHandler.setLevel(logging.DEBUG) else: - logHandler.setLevel(logging.ERROR) -hp_logger.addHandler(logHandler) + fileHandler.setLevel(logging.ERROR) +hp_logger.addHandler(fileHandler) + + +def init_console_logger(): + consoleHandler = logging.StreamHandler() + if DEBUG: + consoleHandler.setLevel(logging.DEBUG) + else: + consoleHandler.setLevel(logging.ERROR) + formatter = logging.Formatter('CONSOLE: %(levelname)s - %(message)s') + consoleHandler.setFormatter(formatter) + # Add handlers to the logger + hp_logger.addHandler(consoleHandler) + return hp_logger + # HARDCODED CONFIGURATION ##################################################### -- libgit2 0.21.2