ASFHyP3 / hyp3-gamma

HyP3 plugin for generating SAR products with GAMMA
BSD 3-Clause "New" or "Revised" License
28 stars 7 forks source link

Fix inconsistent logging output #534

Open jtherrmann opened 7 months ago

jtherrmann commented 7 months ago

Jira: https://asfdaac.atlassian.net/browse/TOOL-2392

Note: The above link is accessible only to members of ASF.


Logging output appears inconsistent, e.g. for this job the log lines at the end of the file do not include the <timestamp> - <level> - prefix (I replaced some lines with [...] to make this example shorter):

12/01/2023 05:59:23 PM - INFO - Proc: system time (s):       0.000
12/01/2023 05:59:23 PM - INFO - Proc: elapsed time (s):      0.000
12/01/2023 05:59:23 PM - INFO - Finished: offset_add 20200308_20200401.off.it 20200308_20200401.off_3 20200308_20200401.off_3.temp
12/01/2023 05:59:23 PM - ERROR - ERROR: Found azimuth offset of               0.03181
!
Running command: rasSLC 20200308_003.slc 23781 1 0 50 10
subprocess return value was 0
Proc: *** DISP Program rasSLC ***
Proc: *** Copyright 2022, Gamma Remote Sensing, v1.6 22-Jun-2022 clw/cm ***
Proc: *** Calculate a multilook intensity raster image from complex data (FCOMPLEX, SCOMPLEX) using power-law scaling ***
Proc: OPENMP: number of physical processors:                     4
Proc: OPENMP: default max. number of threads (program specific): 6
Proc: OPENMP: current max. number of available threads:          4

[...]

Proc: system time (s):       0.420
Proc: elapsed time (s):      2.200
Finished: rasSLC 20200401_003.slc 23779 1 0 50 10

Also, it's annoying that the ERROR line is not the last line of the log, so I want to confirm that the log lines are getting written in the correct order, or if there's something we can do to make the container fail earlier if that ERROR is the reason this job failed.

jtherrmann commented 7 months ago

Also check for print calls in hyp3lib.