Interface MAMLogHandlerWrapper
-
- All Implemented Interfaces:
public interface MAMLogHandlerWrapperLog 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 viaMAMComponents.get(MAMLogHandlerWrapper.class).removeHandler(myHandler);setLogcatPIImay be used to strip PII from messages sent to Logcat in non-production builds. MAM will not log to Logcat in production builds.
-
-
Method Summary
Modifier and Type Method Description abstract voidaddHandler(@NonNull() Handler handler, boolean wantsPII)Add a handler, PII can be toggled. abstract voidremoveHandler(@NonNull() Handler handler)Remove a handler. abstract voidsetLogcatPII(boolean wantsPII)In non-production builds, toggle PII setting for the built-in Logcat handler which writes MAM messages to Logcat. -
-
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
-
-
-
-