Promtail (to Loki) for task logs?

One of the questions that arise with this: is there a hook that would be called at the end of tasks?
Then it'll be an easy method to use that to send the task output to the central logger