当前位置: 首页 > 工具软件 > XcodeColors > 使用案例 >

xcode中CocoaLumberjack的DDLog和XcodeColors插件配合使用时颜色没变问题

靳越
2023-12-01
我在代码中加了

setenv("XcodeColors", "YES", 0);和

[[DDTTYLogger sharedInstance] setColorsEnabled:YES];但是打印出的信息还是黑色的,然后去https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Documentation/XcodeColors.md仔细看了看,有这么一段

You can fix it in a few seconds. Here's how.

  • In Xcode bring up the Scheme Editor (Product -> Edit Scheme...)
  • Select "Run" (on the left), and then the "Arguments" tab
  • Add a new Environment Variable named "XcodeColors", with a value of "YES"
按照这个方法试了下,果然有用。
 类似资料: