@@ -880,6 +880,7 @@ def setup_services(self):
880
880
'name' : container_name ,
881
881
'log-stdout' : service .get ('log-stdout' , False ),
882
882
'log-stderr' : service .get ('log-stderr' , True ),
883
+ 'read-notes-stdout' : service .get ('read-notes-stdout' , False ),
883
884
'read-sci-stdout' : service .get ('read-sci-stdout' , False ),
884
885
}
885
886
@@ -1194,9 +1195,8 @@ def read_container_logs(self):
1194
1195
if container_info ['log-stderr' ] is True :
1195
1196
stderr_behaviour = subprocess .PIPE
1196
1197
1197
-
1198
1198
log = subprocess .run (
1199
- ['docker' , 'logs' , '-t' , container_id ],
1199
+ ['docker' , 'logs' , container_id ],
1200
1200
check = True ,
1201
1201
encoding = 'UTF-8' ,
1202
1202
stdout = stdout_behaviour ,
@@ -1205,10 +1205,16 @@ def read_container_logs(self):
1205
1205
1206
1206
if log .stdout :
1207
1207
self .add_to_log (container_id , f"stdout: { log .stdout } " )
1208
- if container_info ['read-sci-stdout' ]:
1208
+
1209
+ if container_info ['read-notes-stdout' ] or container_info ['read-sci-stdout' ]:
1209
1210
for line in log .stdout .splitlines ():
1210
- if match := re .findall (r'GMT_SCI_R=(\d+)' , line ):
1211
- self ._sci ['R' ] += int (match [0 ])
1211
+ if container_info ['read-notes-stdout' ]:
1212
+ if note := self .__notes_helper .parse_note (line ):
1213
+ self .__notes_helper .add_note ({'note' : note [1 ], 'detail_name' : container_info ['name' ], 'timestamp' : note [0 ]})
1214
+
1215
+ if container_info ['read-sci-stdout' ]:
1216
+ if match := re .findall (r'GMT_SCI_R=(\d+)' , line ):
1217
+ self ._sci ['R' ] += int (match [0 ])
1212
1218
1213
1219
if log .stderr :
1214
1220
self .add_to_log (container_id , f"stderr: { log .stderr } " )
0 commit comments