From 0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 2 Apr 2024 22:42:00 +0200 Subject: Logging file path. --- src/argaze/utils/demo/loggers.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/argaze/utils/demo/loggers.py b/src/argaze/utils/demo/loggers.py index 071e20b..25b55d3 100644 --- a/src/argaze/utils/demo/loggers.py +++ b/src/argaze/utils/demo/loggers.py @@ -16,6 +16,8 @@ __credits__ = [] __copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)" __license__ = "GPLv3" +import logging + from argaze import DataFeatures, GazeFeatures from argaze.GazeAnalysis import * from argaze.utils import UtilsFeatures @@ -28,6 +30,8 @@ class FixationLogger(UtilsFeatures.FileWriter): self.header = "Timestamp (ms)", "Focus (px)", "Duration (ms)", "AOI" + logging.info('%s writes into %s', type(self).__name__, self.path) + def on_look(self, timestamp, frame, exception): """Log frame fixations.""" @@ -51,6 +55,8 @@ class ScanPathAnalysisLogger(UtilsFeatures.FileWriter): self.header = "Timestamp (ms)", "Duration (ms)", "Step", "K", "NNI", "XXR" + logging.info('%s writes into %s', type(self).__name__, self.path) + def on_look(self, timestamp, frame, exception): """Log frame scan path metrics.""" @@ -70,6 +76,12 @@ class ScanPathAnalysisLogger(UtilsFeatures.FileWriter): self.write(log) class VideoRecorder(UtilsFeatures.VideoWriter): + + def __init__(self, **kwargs): + + super().__init__(**kwargs) + + logging.info('%s writes into %s', type(self).__name__, self.path) def on_look(self, timestamp, frame, exception): """Write frame image.""" @@ -84,6 +96,8 @@ class AOIScanPathAnalysisLogger(UtilsFeatures.FileWriter): self.header = "Timestamp (ms)", "Duration (ms)", "Step", "K", "LZC" + logging.info('%s writes into %s', type(self).__name__, self.path) + def on_look(self, timestamp, layer, exception): """Log layer aoi scan path metrics""" -- cgit v1.1