Interface InMobiLogger
-
- All Implemented Interfaces:
public interface InMobiLoggerUnified Logging interface for both remote logging server and local android logger Each logger session starts from logger creation and ends when finish is called. This logger will buffer all the logs of the session and then save the logs locally when finish is called.
creator @neelabh.parui
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classInMobiLogger.BuilderBuilder class for InMobiLogger
public final classInMobiLogger.LoggerConfiguration
-
Method Summary
Modifier and Type Method Description abstract UnitstateChange(String tag, String message)Logs with logLevel LogLevel.STATE To be called when any of the components state changes abstract Unitd(String tag, String message)Logs with logLevel LogLevel.DEBUG To be called for info level logs. abstract Uniti(String tag, String message)Logs with logLevel LogLevel.INFO To be called for debug level logs abstract Unite(String tag, String message)Logs with logLevel LogLevel.ERROR To be called for error level logs abstract Unite(String tag, String message, Exception error)Logs with logLevel LogLevel.ERROR To be called for error level logs with exception abstract UnitupdateVitals(String key, String value)Updates the vitals that is to be included with the remote logging session. abstract UnitforceSend(Boolean forceSend)Force saves the session regardless for internal sampling. abstract Unitreconfigure(InMobiLogger.LoggerConfiguration config)Changes the configuration of the logger abstract Unitsave()Saves the log session locally. abstract Unitfinish()Saves the log session locally. -
-
Method Detail
-
stateChange
abstract Unit stateChange(String tag, String message)
Logs with logLevel LogLevel.STATE To be called when any of the components state changes
- Parameters:
tag- Log Tagmessage- Log Message
-
d
abstract Unit d(String tag, String message)
Logs with logLevel LogLevel.DEBUG To be called for info level logs.
- Parameters:
tag- Log Tagmessage- Log Message
-
i
abstract Unit i(String tag, String message)
Logs with logLevel LogLevel.INFO To be called for debug level logs
- Parameters:
tag- Log Tagmessage- Log Message
-
e
abstract Unit e(String tag, String message)
Logs with logLevel LogLevel.ERROR To be called for error level logs
- Parameters:
tag- Log Tagmessage- Log Message
-
e
abstract Unit e(String tag, String message, Exception error)
Logs with logLevel LogLevel.ERROR To be called for error level logs with exception
- Parameters:
tag- Log Tagmessage- Log Messageerror- exception to be logger
-
updateVitals
abstract Unit updateVitals(String key, String value)
Updates the vitals that is to be included with the remote logging session. Vitals are important session related meta-data that is to be included with the logging session. These are also buffered until finish is called. After that they are also saved locally.
-
forceSend
abstract Unit forceSend(Boolean forceSend)
Force saves the session regardless for internal sampling.
- Parameters:
forceSend- is true, the session will be saved regardless of sampling if false, the sampling will determine whether the session will be saved or not.
-
reconfigure
abstract Unit reconfigure(InMobiLogger.LoggerConfiguration config)
Changes the configuration of the logger
- Parameters:
config- LoggerConfiguration data class containing the config
-
save
abstract Unit save()
Saves the log session locally. This will save all the valid logs and vitals locally but the logs won't be marked as complete.
-
finish
abstract Unit finish()
Saves the log session locally. This will save all the valid logs and vitals locally until they can be picked up by LogSyncExecutor for syncing. The saved logs will be marked as complete.
-
-
-
-