I would like to know how many types od log are there and when to use what type log .Till now i have been using NSLog but when i finally submit the applcation to app store i need to search for the nslog and need to close them all .I have heard of Dlog , Alog but dont know how to use.So is there any solution which would set Log off when we select release, debug modes.It would be great if yuo can provide me a code for diffent Log types and how to use them.
Share
You can define project-wide macros in your
<project>.pchfile. For example:(This assumes you’re setting the DEBUG macro in your debug builds: Is there a macro that Xcode automatically sets in debug builds?)
Then you can use
DLoganywhere you’ve usedNSLogfor messages that should only appear in your debug builds, in your release builds they will be gone.More sophisticated versions can be found in the answers to the question: How to print out the method name and line number and conditionally disable NSLog?
Also, you could roll your own logging class.