Skip to content

Commit

Permalink
Merge pull request #2525 from certtools/default-log-levels
Browse files Browse the repository at this point in the history
default log levels: DEBUG for dev, INFO for stable
  • Loading branch information
sebix authored Jan 3, 2025
2 parents 791b376 + 59d511c commit 0678d0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 0678d0f

Please sign in to comment.