-
public interface CashAppLogger
-
-
Method Summary
Modifier and Type Method Description abstract UnitlogVerbose(String tag, String msg)Log a message with level VERBOSE. abstract UnitlogWarning(String tag, String msg)Log a message with level WARNING. abstract UnitlogError(String tag, String msg, Throwable throwable)Log a message with level ERROR. abstract List<CashAppLogEntry>retrieveLogs()Retrieve all logs. abstract StringlogsAsString()Retrieves all logs, compiled as a single string. abstract UnitsetListener(CashAppLoggerListener listener)Set a listener to be notified when a new log is added. abstract UnitremoveListener()Remove the currently registered listener, if any. -
-
Method Detail
-
logVerbose
abstract Unit logVerbose(String tag, String msg)
Log a message with level VERBOSE.
-
logWarning
abstract Unit logWarning(String tag, String msg)
Log a message with level WARNING.
-
logError
abstract Unit logError(String tag, String msg, Throwable throwable)
Log a message with level ERROR. Optionally include a Throwable to log along the error message.
-
retrieveLogs
abstract List<CashAppLogEntry> retrieveLogs()
Retrieve all logs.
-
logsAsString
abstract String logsAsString()
Retrieves all logs, compiled as a single string. Each log entry is separated by two newline characters. The format of each log entry is: "LEVEL: MESSAGE".
If you need more control over the format, use retrieveLogs instead.
-
setListener
abstract Unit setListener(CashAppLoggerListener listener)
Set a listener to be notified when a new log is added.
-
removeListener
abstract Unit removeListener()
Remove the currently registered listener, if any.
-
-
-
-