Interface LogDelegate

  • All Known Implementing Classes:
    AbstractLogDelegate, DefaultLogDelegate

    public interface LogDelegate
    A log delegate can be set to the Logger. It determines how log messages are written (e.g. to a file, to standard output, to a database) and what levels of log messages are written.
    • Method Detail

      • d

        int d​(String tag,
              String msg,
              Throwable tr)
        Writes a message at level DEBUG.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception
        Returns:
        0 if no error occurred, an error code otherwise
      • d

        int d​(String tag,
              String msg)
        Writes a message at level DEBUG.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • e

        int e​(String tag,
              String msg)
        Writes a message at level ERROR.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • e

        int e​(String tag,
              String msg,
              Throwable tr)
        Writes a message at level ERROR.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception
        Returns:
        0 if no error occurred, an error code otherwise
      • getStackTraceString

        String getStackTraceString​(Throwable tr)
        Returns the stack trace string for the specified exception. The returned string probably contains new lines, but it does not have a trailing new line.
        Parameters:
        tr - the exception
        Returns:
        the stack trace string
      • i

        int i​(String tag,
              String msg,
              Throwable tr)
        Writes a message at level INFO.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception
        Returns:
        0 if no error occurred, an error code otherwise
      • i

        int i​(String tag,
              String msg)
        Writes a message at level INFO.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • isLoggable

        boolean isLoggable​(String tag,
                           int level)
        Determines if messages at the specified level are logged for the specified tag.
        Parameters:
        tag - the tag
        level - the level
        Returns:
        true if the message will be logged, false otherwise
      • println

        int println​(int priority,
                    String tag,
                    String msg)
        Writes a log message.
        Parameters:
        priority - the log level
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • v

        int v​(String tag,
              String msg,
              Throwable tr)
        Writes a message at level VERBOSE.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception or null
        Returns:
        0 if no error occurred, an error code otherwise
      • v

        int v​(String tag,
              String msg)
        Writes a message at level VERBOSE.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • w

        int w​(String tag,
              String msg)
        Writes a message at level WARN.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if the message was written successfully, an error code otherwise
      • w

        int w​(String tag,
              Throwable tr)
        Writes a message at level WARN.
        Parameters:
        tag - the tag
        tr - an exception or null
        Returns:
        0 if no error occurred, an error code otherwise
      • w

        int w​(String tag,
              String msg,
              Throwable tr)
        Writes a message at level WARN.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception or null
        Returns:
        0 if no error occurred, an error code otherwise
      • wtf

        int wtf​(String tag,
                String msg)
        Writes a message at level ASSERT.
        Parameters:
        tag - the tag
        msg - the message
        Returns:
        0 if no error occurred, an error code otherwise
      • wtf

        int wtf​(String tag,
                Throwable tr)
        Writes a message at level ASSERT.
        Parameters:
        tag - the tag
        tr - an exception or null
        Returns:
        0 if no error occurred, an error code otherwise
      • wtf

        int wtf​(String tag,
                String msg,
                Throwable tr)
        Writes a message at level ASSERT.
        Parameters:
        tag - the tag
        msg - the message
        tr - an exception or null
        Returns:
        0 if no error occurred, an error code otherwise