diff options
author | Théo de la Hogue | 2024-04-02 22:42:00 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-04-02 22:42:00 +0200 |
commit | 0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d (patch) | |
tree | fd9cfe6a5273436ebb43a4735c517290791fd680 /src/argaze | |
parent | 39da6755bd10b385d0f09abdcc366f27b0251ce9 (diff) | |
download | argaze-0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d.zip argaze-0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d.tar.gz argaze-0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d.tar.bz2 argaze-0a9a3d0b216a1a10bcef33e51d98f62f1777bc0d.tar.xz |
Logging file path.
Diffstat (limited to 'src/argaze')
-rw-r--r-- | src/argaze/utils/demo/loggers.py | 14 |
1 files changed, 14 insertions, 0 deletions
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""" |