Skip to content

Commit

Permalink
6.3.1 Fixes #67: Logging improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Mar 2, 2024
1 parent 3825609 commit 26dbf2d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## PyTAK 6.3.1

- Fixes #67: Add constrained logging for systemd invocation.

## PyTAK 6.3.0

- Fixes #58: TypeError: can't multiply sequence by non-int of type 'float'.
Expand Down
2 changes: 1 addition & 1 deletion pytak/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:source: <https://github.com/snstac/pytak>
"""

__version__ = "6.3.0"
__version__ = "6.3.1"


from .constants import ( # NOQA
Expand Down
5 changes: 5 additions & 0 deletions pytak/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
("%(asctime)s pytak %(levelname)s - %(message)s")
)

if os.environ.get("INVOCATION_ID"):
LOG_LEVEL = logging.INFO
LOG_FORMAT = logging.Formatter(("[%(levelname)s] %(message)s"))
logging.debug("Systemd format logging enabled via INVOCATION_ID env var.")

if bool(os.environ.get("DEBUG")):
LOG_LEVEL = logging.DEBUG
LOG_FORMAT = logging.Formatter(
Expand Down

0 comments on commit 26dbf2d

Please sign in to comment.