NSLog batch processing after release

Source: Internet
Author: User

NSLog must be used in development, but it is especially performance-consuming. Therefore, it must be removed after the product is released.

It is quite difficult to process NSLog in a large development project, so you can consider macro definition in the pch file, such:

# Define MyLog (...) NSLog (_ VA_ARGS __)

You can comment out the NSLog (_ VA_ARGS _) after the program is released. You can also use conditional judgment to avoid repeated comments:

# Ifdef DEBUG

# Define MyLog (...) NSLog (_ VA_ARGS __)

 

# Else

# Define MyLog (...)

# Endif

 

The pch file is included in each header file. Therefore, you cannot put all the files to be imported into the file because of pch, which increases the burden on the system.

It must be confirmed that almost all files in the system are required to be imported in pch.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.