Skip to content

Commit 47a7ed5

Browse files
authored
OP#10323: Log where an otconfig is saved and whether it is uploaded
Info-level logging so an operator can see, from the log alone, where a save landed and whether it also went to s3 - covering the quick-save path too, which never went through the viewmodel's own save logging.
1 parent a745481 commit 47a7ed5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎OTAnalytics/application/use_cases/config.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from pathlib import Path
22

33
from OTAnalytics.application.datastore import Datastore
4+
from OTAnalytics.application.logger import logger
45
from OTAnalytics.application.parser.config_parser import ConfigParser
56
from OTAnalytics.application.state import ConfigurationFile, CurrentKeyPrefix, FileState
67
from OTAnalytics.application.upload_otconfig import UploadOtconfig
@@ -53,6 +54,7 @@ async def __call__(self, file: Path) -> None:
5354
# The same value reaches `convert` below. Passing it to only one of the
5455
# two would make every project report itself as permanently unsaved.
5556
s3_key_prefix = self._current_key_prefix.get()
57+
logger().info(f"Saving otconfig to '{file}'")
5658
self._config_parser.serialize(
5759
project=project,
5860
video_files=video_files,
@@ -79,4 +81,5 @@ async def __call__(self, file: Path) -> None:
7981
)
8082
)
8183
if s3_key_prefix is not None:
84+
logger().info(f"Uploading otconfig '{file}' to s3 under '{s3_key_prefix}'")
8285
await self._otconfig_upload.upload(file, s3_key_prefix)

0 commit comments

Comments
 (0)