MPLogging /5.5.0

@interface MPLogging : NSObject

SDK logging support.

Public Properties

/consoleLogLevel /+5.5.0

  • Description: Current log level of the SDK console logger. The default value is MPBLogLevelNone.

  • Declaration:

    @property (assign, readwrite, nonatomic, class) MPBLogLevel consoleLogLevel;
  • Parameters: None.

Public Methods

+/addLogger: /+5.5.0

  • Description: Registers a logging destination.

  • Declaration:

    + (void)addLogger:(nonnull id<MPBLogger>)logger;
  • Parameters:

    • logger: Logger to receive log events.

+/removeLogger: /+5.5.0

  • Description: Removes a logger from receiving log events.

  • Declaration:

    + (void)removeLogger:(nonnull id<MPBLogger>)logger;
  • Parameters:

    • logger: Logger to remove.

+/logEvent:source:fromClass: /+5.5.0

  • Description: Logs the event generated from the calling class. The format of the log message will be: @code className | source | logEvent.message @endcode.

  • Declaration:

    + (void)logEvent:(nonnull MPLogEvent *)event
            source:(NSString *_Nullable)source
         fromClass:(Class _Nullable)aClass;
  • Parameters:

    • event: Event to log.
    • source: Optional source of the event. This will generally be ad unit ID for ad-related events.
    • aClass: Class that generated the event.

Last updated August 28, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)