JamesTreap opened a new issue, #36964:
URL: https://github.com/apache/airflow/issues/36964

   ### Description
   
   Within the Task instances context, there is a way to obtain a log URL. 
However, there is no way to directly access the log via the Task Instance 
context. Would be nice to have an API endpoint or callback that retrieves it, 
e.g `outputlog = context.get_log`. 
   
   Bonus points if additional query params could be added, such as ?lines=5 
(yielding the last 5 lines) or so on, but is optional.
   
   ### Use case/motivation
   
   Use cases would be alert notifications where you may want the last ~nth 
lines of output or so, or DAG summaries per step. Users could call upon the log 
object, from there they could pipe the last nth lines or so to output (and/or 
any other manipulations they choose), depending on how they see fit.
   
   ### Related issues
   
   N/A - could not find any.
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to