Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

xcode - How to filter the xcodebuild command line output?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...