我刚刚升级到 cocos 2.1,看到控制台的日志记录非常荒谬,例如:
2013-09-18 23:15:38.120 Notes and Clefs[842:907] cocos2d: deallocing <CCSprite = 0x1182aa0 | Rect = (816.00,640.00,32.00,64.00) | tag = -1 | atlasIndex = -1>
2013-09-18 23:15:38.121 Notes and Clefs[842:907] cocos2d: deallocing <CCSprite = 0x1182600 | Rect = (816.00,128.00,32.00,64.00) | tag = -1 | atlasIndex = -1>
2013-09-18 23:15:38.122 Notes and Clefs[842:907] cocos2d: deallocing <CCArray = 0x1161e00> = ( <CCSprite = 0x1182790 | Rect = (816.00,640.00,32.00,64.00) | tag = -1 | atlasIndex = -1>, )
etc..
通过查看代码,我看到:
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
#define CCLOG(...) do {} while (0)
#define CCLOGWARN(...) do {} while (0)
#define CCLOGINFO(...) do {} while (0)
#elif COCOS2D_DEBUG == 1
#define CCLOG(...) __CCLOG(__VA_ARGS__)
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
#define CCLOGINFO(...) do {} while (0)
#elif COCOS2D_DEBUG > 1
#define CCLOG(...) __CCLOG(__VA_ARGS__)
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
#define CCLOGINFO(...) __CCLOG(__VA_ARGS__)
#endif // COCOS2D_DEBUG
我设置了 COCOS2D_DEBUG = 0,但我仍然得到相同的详细日志记录......
我的项目中有 Cocos2D 作为静态库 .a 文件。这个 .a 是否可能已经在级别 2 或其他地方定义了宏/常量,这就是为什么我认为它没有任何区别?
谁能推荐一种关闭此功能的方法?