How do I turn off MoPub iOS device console logs?


#1

If you are using the Fabric MoPub integration, there currently is not a way to disable these logs as Fabric is not open source.

If you are using the MoPub SDK integration, please follow the below steps.

In the file MPLogging.m, change the line

static MPLogLevel systemLogLevel = MPLogLevelInfo;

to:

static MPLogLevel systemLogLevel = MPLogLevelOff;

Please see the below on references to log levels:


#2

This should also be possible using Fabric cos it’s really annoying right now. Please implement it.


#3

Thanks for the feedback debijanster.

I have escalated this request to our team. If you have any other feedback, please email support@mopub.com.

Thanks,
Edward


#4

There is an error.

You should look for the mentioned systemLogLevel settings in the .m file not .h file.

In the file MPLogging.m, change the line

static MPLogLevel systemLogLevel = MPLogLevelInfo;

to:

static MPLogLevel systemLogLevel = MPLogLevelOff;

#5

Thanks for the correction. I have edited my original comment.


#6

I think I found a better way of doing it, using the Cocoapods integration. I hate changing external library files, since with each ‘pod update’ they will be reset to their default code implementation. In the AppDelegate:

#import <mopub-ios-sdk/MPLogging.h>

and then, in -didFinishLaunchingWithOptions, before initializing the Fabric framework:

MPLogSetLevel(MPLogLevelOff);

It seems to work nicely.