Closed v36372 closed 8 months ago
Hi, I am having a need to download all logs belong to a jobs. Something like the SQL query below
SELECT contents FROM tasks_log_parts WHERE task_id in( SELECT id FROM tasks WHERE job_id = 'b9cffbdc0a24451fa09763e80eb6b4ce') ORDER BY number_;
You need to download the logs in .txt right ? so could just add download button in frontend. or am I missing something here ?
@v36372 concerning the strange prefixes in the logs, the latest release should fix that.
As for getting all the task logs for a single job you could call the /tasks/:id/log
endpoint for each task in your job using the APIs.
@runabol I have added download btn which will download a .txt file of all the logs in frontend next js code ( in log and view both ) will this suffice what @v36372 is looking for " having a need to download all logs belong to a job "
Thanks @runabol.
Another related observation is that the logs are reversed in order when returned from the API. I personally think it would be more intuitive if it was newest logs at the bottom and the Frontend NextJS would auto scroll to bottom when refreshed.
@bit-wiz Thank you for the download button. But did you create a PR in https://github.com/runabol/tork-web?
Thanks @runabol.
Another related observation is that the logs are reversed in order when returned from the API. I personally think it would be more intuitive if it was newest logs at the bottom and the Frontend NextJS would auto scroll to bottom when refreshed.
@bit-wiz Thank you for the download button. But did you create a PR in https://github.com/runabol/tork-web?
yeah just did, I was waiting for confirmation
Another related observation is that the logs are reversed in order when returned from the API. I personally think it would be more intuitive if it was newest logs at the bottom and the Frontend NextJS would auto scroll to bottom when refreshed.
Task logs can get quite large (MBs is not uncommon in our use cases) and would tax both the backend and the UI unnecessarily. I think it's better to fetch the last page of the log and retrieve additional pages one by one as needed.
Hi, I am having a need to download all logs belong to a jobs. Something like the SQL query below
Also, may I ask why does some log lines got prepended by some random bytes like this: