I am using a third party fastlane plugin and it contains an action that will display vital information I need to capture, such as a link.
I am trying to find an elegant way to capture these logs within the fastlane actions, I am trying to avoid using a shell command but if it's the only way, then I suppose I have no choice.
I need this link as it is a unique and random link that contains resources I'd like to download.
I have tried redirecting stdout to no avail since fastlane uses their own logger (usually UI.message) and was about to submit a feature request to fastlane but figured perhaps someone else has ran into this and managed to get past it.
Is there anyway to redirect this type of log and capture it?
Here is the fastlane source code around UI: https://github.com/fastlane/fastlane/tree/master/fastlane_core/lib/fastlane_core/ui
And here is one of the ways I tried redirecting output: Capturing logger output inside a method
Any help / advice / resources would be appreciated!
I forgot to update this, but in the end I solved it as such:
and I utilized it like this:
What
upload_xctrestrun
does is irrelevant, just know that it is a function from a fastlane plugin which outputs messages using the fastlaneUI
object like so:Hope this helps anyone :)