MPLogging

@interface MPLogging : NSObject

SDK logging support.

Public Properties

/consoleLogLevel

  • 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:

  • Description: Registers a logging destination.

  • Declaration:

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

    • logger: Logger to receive log events.

+/removeLogger:

  • Description: Removes a logger from receiving log events.

  • Declaration:

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

    • logger: Logger to remove.

+/logEvent:source:fromClass:

  • 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 February 27, 2020

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.

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