Interface LogWriter

  • All Known Implementing Classes:
    Slf4jLogWriter, WriterLogWriter

    public interface LogWriter
    A LogWriter provides methods for persisting log messages by some implementation specific means. Implementations must be thread safe. That is, implementations must cope with any thread concurrently calling any method of this interface at any time.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void enter​(java.lang.String methodName, java.lang.Object[] args)
      Called right before a method of a SPI entity is called.
      void error​(java.lang.String methodName, java.lang.Object[] args, java.lang.Exception e)
      Called right after a method of a SPI entity has been called and an exception was thrown.
      void leave​(java.lang.String methodName, java.lang.Object[] args, java.lang.Object result)
      Called right after a method of a SPI entity has been called if no exception was thrown.
      long systemTime()
      Implementation specific time stamp which is logged along with each log message.
    • Method Detail

      • systemTime

        long systemTime()
        Implementation specific time stamp which is logged along with each log message. The values returned by this method should be monotone with respect to the time they represent.
        Returns:
      • enter

        void enter​(java.lang.String methodName,
                   java.lang.Object[] args)
        Called right before a method of a SPI entity is called.
        Parameters:
        methodName - name of the method which a about to be called
        args - arguments passed to the methods which is about to be called.
      • leave

        void leave​(java.lang.String methodName,
                   java.lang.Object[] args,
                   java.lang.Object result)
        Called right after a method of a SPI entity has been called if no exception was thrown.
        Parameters:
        methodName - name of the method which has been called
        args - arguments passed to the method which has been called
        result - return value of the method which has been called
      • error

        void error​(java.lang.String methodName,
                   java.lang.Object[] args,
                   java.lang.Exception e)
        Called right after a method of a SPI entity has been called and an exception was thrown.
        Parameters:
        methodName - name of the method which has been called
        args - arguments passed to the method which has been called
        e - exception which was thrown by the method which has been called