public interface

MAMLogHandlerWrapper

com.microsoft.intune.mam.log.MAMLogHandlerWrapper

Class Overview

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.

Summary

Public Methods
abstract void addHandler(Handler handler, boolean wantsPII)
Add a handler, PII can be toggled.
abstract void removeHandler(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.

Public Methods

public abstract void addHandler (Handler handler, boolean wantsPII)

Add a handler, PII can be toggled.

Parameters
handler handler to add.
wantsPII if PII is permitted in the logs.

public abstract void removeHandler (Handler handler)

Remove a handler.

Parameters
handler handler to remove.

public 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