重写NSLog,Debug模式下打印日志和当前行数
2024-10-10 12:18:33
在pch文件中加入以下命令,NSLog在真机测试中就不会打印了
//重写NSLog,Debug模式下打印日志和当前行数
#if DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"\nfunction:%s line:%d content:%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define NSLog(FORMAT, ...) nil
#endif
最新文章
- 移动端Web页面问题(转载)
- 【转】一些 SQLite技巧
- Jenkins基础 - 常用配置操作
- 【ZOJ】3329 One Person Game
- Perl Sort函数用法总结和使用实例
- 用纯原生js实现jquery的ready函数(两种实现)
- 得到当前活动的controller
- hdu 2034
- Web API-路由(二)
- centos服务器设置代理上网的方法
- TypeScript设计模式之中介者、观察者
- OpenSSL中的大数接口与基于其的自用RSA加密接口设计
- java简单数据类型转化
- 利用canvas 导出图片
- WPF Command
- Unity使用C++作为游戏逻辑脚本的研究
- phpexcel 使用说明
- MYSQL安装报错 -- 出现Failed to find valid data directory.
- git 不能创建分支
- 2018年12月25日 圣诞节快乐 生成器plus
热门文章
- IntelliJ IDEA(社区版)学习记录
- 用MSoffice里的绘图工具
- Javascript 笔记与总结(2-9)获取运行时的 style 对象
- jQuery 判断多个 input file 都不能为空
- json+mvc
- try...except 抛出错误
- 利用Excel画柱状图,并且包含最大最小值
- push to deploy
- simplify the design of the hardware forming the interface between the processor and thememory system
- The ";get"; method should be used when the form is idempotent---正交的两个概念---