Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent logging output #534

Open
jtherrmann opened this issue Nov 29, 2023 · 1 comment
Open

Fix inconsistent logging output #534

jtherrmann opened this issue Nov 29, 2023 · 1 comment
Labels
Jira Bug Create a Jira Bug for this issue

Comments

@jtherrmann
Copy link
Contributor

jtherrmann commented Nov 29, 2023

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 jtherrmann added the Jira Bug Create a Jira Bug for this issue label Nov 29, 2023
@jtherrmann jtherrmann changed the title Convert print to logging.log Fix inconsistent logging output Dec 1, 2023
@jtherrmann
Copy link
Contributor Author

Also check for print calls in hyp3lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Bug Create a Jira Bug for this issue
Projects
None yet
Development

No branches or pull requests

1 participant