Interface MAMLogHandlerWrapper

  • All Implemented Interfaces:

    
    public interface MAMLogHandlerWrapper
    
                        

    Log handler interface that allows your app to register for MAM log messages. PII will optionally be stripped from all messages. To use this, you should build your own log handler and add it via MAMComponents.get(MAMLogHandlerWrapper.class).addHandler(myHandler, false);. You may also remove the handler entirely via MAMComponents.get(MAMLogHandlerWrapper.class).removeHandler(myHandler);setLogcatPII may be used to strip PII from messages sent to Logcat in non-production builds. MAM will not log to Logcat in production builds.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void addHandler(@NonNull() Handler handler, boolean wantsPII) Add a handler, PII can be toggled.
      abstract void removeHandler(@NonNull() Handler handler) Remove a handler.
      abstract void setLogcatPII(boolean wantsPII) In non-production builds, toggle PII setting for the built-in Logcat handler which writes MAM messages to Logcat.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • addHandler

         abstract void addHandler(@NonNull() Handler handler, boolean wantsPII)

        Add a handler, PII can be toggled.

        Parameters:
        handler - handler to add.
        wantsPII - if PII is permitted in the logs.
      • removeHandler

         abstract void removeHandler(@NonNull() Handler handler)

        Remove a handler.

        Parameters:
        handler - handler to remove.
      • setLogcatPII

         abstract void setLogcatPII(boolean wantsPII)

        In non-production builds, toggle PII setting for the built-in Logcat handler which writes MAM messages to Logcat. Default is on when in offline mode and the value of the verbose logging Company Portal setting when the Company Portal is installed. In production builds, MAM does not log to logcat and this method has no effect. In non-production builds (testOnly/debuggable app, or non-production Company Portal), MAM does log to logcat.

        Parameters:
        wantsPII - if PII is permitted in logcat