MBXLogConfiguration


@interface MBXLogConfiguration : NSObject

Class that allows to configure Mapbox SDKs logging per application.

  • Sets the backend which writes the log.

    Declaration

    Objective-C

    + (void)registerLogWriterBackendForLogWriter:
        (nullable id<MBXLogWriterBackend>)logWriter;

    Parameters

    logWriter

    Backend which writes logs, if you provide null for this parameter then previously used logger backend will be replaced with Mapbox default implementation.

  • Sets the default logging level.

    The logging level for a specific category can be overridden using the setLoggingLevel(category, upTo) overload.

    Declaration

    Objective-C

    + (void)setLoggingLevelForUpTo:(nullable NSNumber *)upTo;

    Parameters

    upTo

    Log messages with lower severity than this parameter will be filtered out. If the parameter is empty, all log messages are filtered out, i.e., logging is disabled.

  • Return current default logging level.

    Declaration

    Objective-C

    + (nullable NSNumber *)getLoggingLevel;

    Return Value

    Current default logging level or nothing if logging is disabled.

  • Sets the logging level for provided category.

    Declaration

    Objective-C

    + (void)setLoggingLevelForCategory:(nonnull NSString *)category
                                  upTo:(nullable NSNumber *)upTo;

    Parameters

    category

    Category that should be used for applied configuration.

    upTo

    Log messages for provided category and with lower severity than this parameter will be filtered out. If the parameter is empty, all log messages are filtered out, i.e., logging is disabled.

  • Return current logging level for category.

    Declaration

    Objective-C

    + (nullable NSNumber *)getLoggingLevelForCategory:(nonnull NSString *)category;

    Parameters

    category

    Category that can be used for filtering.

    Return Value

    Configured logging level for category, or nothing if logging category is disabled.

  • Reset logging level for category to default logging level.

    Declaration

    Objective-C

    + (void)resetLoggingLevelForCategory:(nonnull NSString *)category;

    Parameters

    category

    Category that can be used for filtering.