Running xcodebuild
from the console will bring you very verbose output and I wasn't able to locate any options for limit its output in order to display only warnings and errors.
I'm looking for a way to capture the xcodebuild
output and filter it. It would prefer a Python solution that will work with pipes but I'm open to other approaches as long they are command line based solutions.
Are any tools that are already able to do this?
Use xcodebuild -quiet
.
According to the xcodebuild man page:
-quiet : Do not print any output except for warnings and errors.
Bonus: No other tools necessary! (Although I also like xcodebuild | xcpretty
)
I build with Travis CI, which complains after 4 MB of logs. This argument solved the problem.
There’s a Ruby gem called xcpretty
.
It filters the output of xcodebuild
and also provides different formatters and coloring.
UPDATE: As Mike Hardy correctly states in the comments to this answer, xcpretty
is no longer maintained.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With