在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

最新文章

  1. 移动端Web页面问题(转载)
  2. 【转】一些 SQLite技巧
  3. Jenkins基础 - 常用配置操作
  4. 【ZOJ】3329 One Person Game
  5. Perl Sort函数用法总结和使用实例
  6. 用纯原生js实现jquery的ready函数(两种实现)
  7. 得到当前活动的controller
  8. hdu 2034
  9. Web API-路由(二)
  10. centos服务器设置代理上网的方法
  11. TypeScript设计模式之中介者、观察者
  12. OpenSSL中的大数接口与基于其的自用RSA加密接口设计
  13. java简单数据类型转化
  14. 利用canvas 导出图片
  15. WPF Command
  16. Unity使用C++作为游戏逻辑脚本的研究
  17. phpexcel 使用说明
  18. MYSQL安装报错 -- 出现Failed to find valid data directory.
  19. git 不能创建分支
  20. 2018年12月25日 圣诞节快乐 生成器plus

热门文章

  1. IntelliJ IDEA(社区版)学习记录
  2. 用MSoffice里的绘图工具
  3. Javascript 笔记与总结(2-9)获取运行时的 style 对象
  4. jQuery 判断多个 input file 都不能为空
  5. json+mvc
  6. try...except 抛出错误
  7. 利用Excel画柱状图,并且包含最大最小值
  8. push to deploy
  9. simplify the design of the hardware forming the interface between the processor and thememory system
  10. The "get" method should be used when the form is idempotent---正交的两个概念---