Commit b3e8e10d authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix default log file path

parent 46be0747
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ SECRET_KEY = (
DEBUG = True if os.getenv("JAMA_DEBUG") == "1" else False

JAMA_IIIF_ENDPOINT = os.getenv("JAMA_IIIF_ENDPOINT") or "http://localhost/iip/IIIF="
JAMA_LOG_FILE = os.getenv("JAMA_LOG_FILE") or "jama.log"
JAMA_LOG_FILE = os.getenv("JAMA_LOG_FILE") or "{}/jama.log".format(BASE_DIR)
ALLOWED_HOSTS = ["*"]


@@ -191,15 +191,15 @@ LOGGING = {
            "class": "logging.StreamHandler",
            "formatter": "console",
        },
        #"file": {
        #    "level": "DEBUG",
        #    "class": "logging.FileHandler",
        #    "formatter": "file",
        #    "filename": JAMA_LOG_FILE,
        #},
        "file": {
            "level": "DEBUG",
            "class": "logging.FileHandler",
            "formatter": "file",
            "filename": JAMA_LOG_FILE,
        },
    },
    "loggers": {
        "": {"level": "INFO", "handlers": ["console"]},
        #"rpc.sql": {"level": "DEBUG", "handlers": ["file"]},
        "rpc.sql": {"level": "DEBUG", "handlers": ["file"]},
    },
}