xcode 在命令行上运行 xcodebuild,在哪里查看日志?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12567128/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Running xcodebuild on command line, where to view logs?
提问by Mr. Boy
I want to view the log when building an xcode (4.5) project from the command-line, since the output in the command-line window itself is too long and messy. Is there a standard place the logs would go, I can't seem to find them?
我想在从命令行构建 xcode (4.5) 项目时查看日志,因为命令行窗口本身的输出太长且混乱。日志有没有一个标准的地方,我似乎找不到它们?
采纳答案by Analog File
Like all command line tools, output goes to standard output and error goes to standard error. By default this is your command line terminal. Use piping and/or redirection if you want them somewhere else. Check your command line interpreter documentation for more info (probably you are using bash, so check man bash
).
与所有命令行工具一样,输出进入标准输出,错误进入标准错误。默认情况下,这是您的命令行终端。如果您想在其他地方使用管道和/或重定向。检查您的命令行解释器文档以获取更多信息(可能您正在使用 bash,因此请检查man bash
)。
回答by Lou Franco
There are logs in ~/Library/Developer/Xcode/DerivedData
-- you'll have to figure out which sub folder is for your build, but in there is Logs/Build/UUID.xcactivitylog
有登录~/Library/Developer/Xcode/DerivedData
- 您必须弄清楚哪个子文件夹用于您的构建,但是在那里Logs/Build/UUID.xcactivitylog
If you rename that file to a .zip and unzip, there's a text file log in there of the build.
如果您将该文件重命名为 .zip 并解压缩,则会有一个文本文件登录到构建中。