---
title: "打开了优化选项后不打印log"
author: "mrjeye"
date: "2011-08-18T14:34:47Z"
tags: ["ioslog nslog"]
categories: ["移动开发"]
slug: "log"
draft: false
lastmod: "2011-08-18T14:34:47Z"
id: 1152366
url: "https://mrjeye.iteye.com/blog/1152366"
---

.pch


```java

#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif

```