Xcode 的彩色控制台输出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2749955/
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
Xcode's colored console output
提问by krasnyk
Is possible to format/color the output in the Xcode console? I know that you can do that while debugging CoreData on Mac by setting:
com.apple.CoreData.SQLDebug 3
and
com.apple.CoreData.SyntaxColoredLogging YES
是否可以在 Xcode 控制台中格式化/着色输出?我知道你可以做到这一点,而在Mac上调试CoreData的设置:
com.apple.CoreData.SQLDebug 3
和
com.apple.CoreData.SyntaxColoredLogging YES
What with our own logs, can we color/format them too somehow?
对于我们自己的日志,我们可以以某种方式对它们进行着色/格式化吗?
回答by Stu
I found a plug-in that supports console logging in ANSI color-codes here: http://deepitpro.com/en/articles/XcodeColors/info/
我在这里找到了一个支持控制台登录 ANSI 颜色代码的插件:http: //deepitpro.com/en/articles/XcodeColors/info/
There's also a fork of this same code that works well and uses a custom syntax to color the text: https://github.com/robbiehanson/XcodeColors
还有一个相同代码的分支,运行良好并使用自定义语法为文本着色:https: //github.com/robbiehanson/XcodeColors