Interface InMobiLogger

  • All Implemented Interfaces:

    
    public interface InMobiLogger
    
                        

    Unified 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

    • Constructor Detail

    • 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 Tag
        message - 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 Tag
        message - 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 Tag
        message - 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 Tag
        message - 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 Tag
        message - Log Message
        error - 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.
      • 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.