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

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

    • 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(String methodName, 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(String methodName, Object[] args, 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(String methodName, Object[] args, 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