Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default log levels: DEBUG for dev, INFO for stable #2525

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/dev/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ These apply to all projects:

- `intelmq/version.py`: Update the version.

Eventually adapt the default log levels if necessary. Should be INFO for stable releases.

### IntelMQ API

- `intelmq_api/version.py`: Update the version.
Expand Down
9 changes: 7 additions & 2 deletions intelmq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2014 Tomás Lima
# SPDX-FileCopyrightText: 2014 Tomás Lima, 2015-2020 nic.at GmbH, 2024 Institute for Common Good Technology
#
# SPDX-License-Identifier: AGPL-3.0-or-later

Expand Down Expand Up @@ -29,7 +29,12 @@
VAR_STATE_PATH = os.path.join(ROOT_DIR, "var/lib/bots/")


DEFAULT_LOGGING_LEVEL = "INFO"
if isinstance(__version_info__[-1], str) and __version_info__[-1][0].lower() in ('a', 'b', 'd'):
# for alpha, beta and dev instances, set default log level to DEBUG, for others, including RCs, use INFO
DEFAULT_LOGGING_LEVEL = "DEBUG"
else:
DEFAULT_LOGGING_LEVEL = "INFO"

HARMONIZATION_CONF_FILE = os.path.join(CONFIG_DIR, "harmonization.conf")
RUNTIME_CONF_FILE = os.path.join(CONFIG_DIR, "runtime.yaml")
old_runtime_conf_file = pathlib.Path(RUNTIME_CONF_FILE).with_suffix('.conf')
Expand Down
Loading