How can I control error level of NSLog messages on iOS?

sorin picture sorin · Jun 9, 2011 · Viewed 7k times · Source

I observed the NSLog() does log all my messages with error level Warning but when I look to the console I see other messages with different error levels like Info, or `Error.

How can I control the error level of my messages?

Answer

rickerbh picture rickerbh · Jan 20, 2012

I don't believe you can alter the logging level of NSLog() messages. You can use 3rd party logging solutions (or write your own macro) to insert different error level strings into the logs that can then be filtered on.

Check out the following libraries for pre-built logging solutions.