diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c7952..de7e433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog], and this project adheres to - [#14](https://github.com/MAAP-Project/gedi-subsetter/issues/14) AWS S3 credentials are no longer obtained via the `maap-py` library. Instead, they are obtained via a role using the EC2 instance metadata. +- [#72](https://github.com/MAAP-Project/gedi-subsetter/issues/72) Log messages + now use ISO 8601 UTC combined date and time representations with milliseconds. ## 0.7.0 (2024-04-23) diff --git a/src/gedi_subset/subset.py b/src/gedi_subset/subset.py index bf20bd8..7b10f53 100755 --- a/src/gedi_subset/subset.py +++ b/src/gedi_subset/subset.py @@ -4,6 +4,7 @@ import multiprocessing import os import os.path +import time from dataclasses import dataclass from pathlib import Path from typing import Any, Callable, Iterable, Mapping, NoReturn, Optional, Sequence, Tuple @@ -49,6 +50,10 @@ LOGGING_FORMAT = "%(asctime)s [%(processName)s:%(name)s] [%(levelname)s] %(message)s" logging.basicConfig(level=logging.INFO, format=LOGGING_FORMAT) +logging.Formatter.converter = time.gmtime +logging.Formatter.default_time_format = "%Y-%m-%dT%H:%M:%S" +logging.Formatter.default_msec_format = "%s,%03dZ" + logger = logging.getLogger("gedi_subset")