Skip to content

Commit

Permalink
Revert "Manage log files if they are inside a volume"
Browse files Browse the repository at this point in the history
This reverts commit cc37445.
  • Loading branch information
0ssigeno committed Mar 19, 2024
1 parent 3515888 commit 2f24f68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion intel_owl/settings/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
MEDIA_ROOT = BASE_DIR / "files_required"
CONFIG_ROOT = PROJECT_LOCATION / "configuration"
YARA_RULES_PATH = MEDIA_ROOT / "yara"
LOG_DIR = Path("/") / "var" / "log" / "intel_owl"

# test / ci
MOCK_CONNECTIONS = get_secret("MOCK_CONNECTIONS", False) == "True"
STAGE = get_secret("STAGE", "local")
Expand Down
12 changes: 2 additions & 10 deletions intel_owl/settings/logging.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl
# See the file 'LICENSE' for copying permission.
import os

from intel_owl import secrets

from ._util import set_permissions
from .commons import DEBUG, LOG_DIR

DJANGO_LOG_DIRECTORY = LOG_DIR / "django"
UWSGI_LOG_DIRECTORY = LOG_DIR / "uwsgi"
ASGI_LOG_DIRECTORY = LOG_DIR / "asgi"
for path in [DJANGO_LOG_DIRECTORY, UWSGI_LOG_DIRECTORY, ASGI_LOG_DIRECTORY]:
os.makedirs(path, exist_ok=True)
set_permissions(path)
from .commons import DEBUG

DISABLE_LOGGING_TEST = secrets.get_secret("DISABLE_LOGGING_TEST", False) == "True"
DJANGO_LOG_DIRECTORY = "/var/log/intel_owl/django"
INFO_OR_DEBUG_LEVEL = "DEBUG" if DEBUG else "INFO"
LOG_MSG_FORMAT = "%(asctime)s - %(name)s - %(funcName)s - %(levelname)s - %(message)s"

Expand Down

0 comments on commit 2f24f68

Please sign in to comment.