@@ -93,10 +93,10 @@ def export_getPilotOutput(self, pilotReference):
93
93
94
94
result = self .pilotAgentsDB .getPilotInfo (pilotReference )
95
95
if not result ["OK" ]:
96
- self .log .error ("Failed to get info for pilot" , result [" Message" ] )
96
+ self .log .error ("Failed to get info for pilot" , f" { pilotReference } : { result [' Message' ] } " )
97
97
return S_ERROR ("Failed to get info for pilot" )
98
98
if not result ["Value" ]:
99
- self .log .warn ("The pilot info is empty" , pilotReference )
99
+ self .log .warn ("The pilot info is empty for " , pilotReference )
100
100
return S_ERROR ("Pilot info is empty" )
101
101
102
102
pilotDict = result ["Value" ][pilotReference ]
@@ -105,11 +105,14 @@ def export_getPilotOutput(self, pilotReference):
105
105
# classic logs first, by default
106
106
funcs = [self ._getPilotOutput , self ._getRemotePilotOutput ]
107
107
if remote :
108
+ self .log .info ("Trying to retrieve output of pilot" , f"{ pilotReference } remotely first" )
108
109
funcs .reverse ()
109
110
110
111
result = funcs [0 ](pilotReference , pilotDict )
111
112
if not result ["OK" ]:
112
- self .log .warn ("Pilot log retrieval failed (first attempt), remote ?" , remote )
113
+ self .log .warn (
114
+ "Failed getting output for pilot" , f"{ pilotReference } . Will try another approach: { result ['Message' ]} "
115
+ )
113
116
result = funcs [1 ](pilotReference , pilotDict )
114
117
return result
115
118
else :
0 commit comments