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

Less verbose log printing on failed batch job #332

Closed
soxofaan opened this issue Oct 5, 2022 · 3 comments
Closed

Less verbose log printing on failed batch job #332

soxofaan opened this issue Oct 5, 2022 · 3 comments
Assignees

Comments

@soxofaan
Copy link
Member

soxofaan commented Oct 5, 2022

if status != "finished":
print(textwrap.dedent("""
Your batch job {i!r} failed.
Logs can be inspected in an openEO (web) editor or with `connection.job({i!r}).logs()`.
""".format(i=self.job_id)))
# TODO: make it possible to disable printing logs automatically?
# TODO: render logs jupyter-aware in a notebook context?
# TODO: only print the error level logs? Or the tail of the logs?
print("Printing logs:")
print(self.logs())

This automatic log printing when a batch job failed is currently very verbose (up to debug level).
I have notebooks with failed jobs that have thousands of lines of this log dumping. That's not very practical to work with (e.g. copy-paste it to the support forum)

I guess we should only show warn and error level by default, and show instructions to get more detailed logs

@soxofaan
Copy link
Member Author

soxofaan commented Oct 5, 2022

@jdries what do you think?

@jdries
Copy link
Collaborator

jdries commented Nov 21, 2022

Indeed, filtering on even only 'ERROR' logs would make more sense.

@jdries jdries assigned JohanKJSchreurs and unassigned soxofaan Jan 25, 2023
JohanKJSchreurs added a commit that referenced this issue Feb 1, 2023
…ror logs are printed after failed batch job
JohanKJSchreurs added a commit that referenced this issue Feb 1, 2023
JohanKJSchreurs added a commit that referenced this issue Feb 1, 2023
JohanKJSchreurs added a commit that referenced this issue Feb 7, 2023
soxofaan pushed a commit that referenced this issue Feb 10, 2023
@soxofaan
Copy link
Member Author

merged #374

soxofaan added a commit that referenced this issue Feb 10, 2023
- handle default in normalize_log_level a bit differently
- reduce printing volume on failed job bit more
soxofaan added a commit that referenced this issue Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants