Xcode的彩色控制台输出 [英] Xcode's colored console output
问题描述
可以在Xcode控制台中格式化/输出颜色吗?我知道您可以在Mac上调试CoreData,通过设置:
com.apple.CoreData.SQLDebug 3
和
com.apple.CoreData.SyntaxColoredLogging YES
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
使用我们自己的日志,我们可以为某种颜色/格式吗?
What with our own logs, can we color/format them too somehow?
推荐答案
我发现一个插件支持在这里的ANSI颜色代码中的控制台日志记录: http://deepitpro.com/en/articles/XcodeColors/info/
I found a plug-in that supports console logging in ANSI color-codes here: http://deepitpro.com/en/articles/XcodeColors/info/
还有一个叉子的相同代码,工作良好,并使用自定义语法来对文本进行着色: https://github.com/robbiehanson/XcodeColors
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
这篇关于Xcode的彩色控制台输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!