Skip to content

Is it possible to change the log level while the application runs? #1399

Closed Answered by ffried
nemesyssoft asked this question in Q&A
Discussion options

You must be logged in to vote

This would mean that you need to import AppDelegate.h in every place you use DDLogXYZ. And this in turn means that each of those headers define a new ddLogLevel. What you need to do is to declare your ddLogLevel as extern in AppDelegate.h and initialize it in AppDelegate.m.
Or even better: Create new Logging.h and Logging.m files that take care of this, removing the need to link AppDelegate.h to every place in the app that needs logging 😉

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nemesyssoft
Comment options

Answer selected by ffried
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants