diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d17713cc..b8a4352c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,6 +35,12 @@ jobs: run: | cd docs make html + zip build/html/salmon-html-docs.zip build/html/* build/html/**/* + - name: Build backup docs + run: | + cd docs + make latexpdf + mv build/latexpdf/salmon.pdf build/html/salmon.pdf - name: Upload docs to gh-pages branch uses: peaceiris/actions-gh-pages@v3 with: diff --git a/salmon/utils.py b/salmon/utils.py index 897cd058..aceb08e1 100644 --- a/salmon/utils.py +++ b/salmon/utils.py @@ -10,14 +10,15 @@ from queue import SimpleQueue as Queue from typing import List -LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO") - def get_logger(name): # Config from https://docs.python-guide.org/writing/logging/ and # https://docs.python-guide.org/writing/logging/ logger = logging.getLogger(name) + DEBUG = int(os.environ.get("SALMON_DEBUG", "0")) + LOG_LEVEL = "DEBUG" if DEBUG else "INFO" LEVEL = getattr(logging, LOG_LEVEL) + formatter = logging.Formatter("%(asctime)s %(name)s %(levelname)s: %(message)s") handlers = []