How to send file into Slack with failed logs?

Hi there!

I want to build android apk with openjdk 8 and gradle. I created pipeline as like in this manual https://buddy.works/docs/quickstart/android . But action that make Sign Android aplication crashed, so I want to upload file that contain $BUDDY_FAILED_ACTION_LOGS into my Slack. But I can’t understand how to catch java failed logs into file, where to store it. Can anyone help me with examples?