Interface ILogger

All Superinterfaces:
ILogger

public interface ILogger extends ILogger
Logging subsystem interface.

This is the minimal interface suitable for various logging systems which are out there.

Implementation should follow two rules:

  • logging system is a "no-exception zone" - never ever throw any exception from these methods
  • if logging system lacks some category, use some other - never ever ignore anything unless told so by the user (with the exception of debugs)

Supports messages implementing IStructuredLogMessage.

Author:
Stepan Roh, Polarion Software
See Also:
  • Method Details

    • getLogFiles

      @NotNull Collection<File> getLogFiles()
      Returns a collection of all logging files associated with the logger of the root job.

      Returned files may or may not exist. (If created on-demand when something is logged.)

      The logging file format used depends on the logging framework.

      The logging framework does not need to support logging to files.

      Modifying, removing, or otherwise altering these files is forbidden. However, the logging framework should recover from any damage.

      Returns:
      Collection of Files (not null)
    • getLogFile

      File getLogFile()
      Returns the main log file of this job.
      Since:
      3.7.3
    • getLogEvents

      @NotNull List<ILogEvent> getLogEvents()
      Return all recorded log events.

      Recorded events will most probably not survive through restarts.

      Note that returned log event classes will not be Serializable.

      Returns:
      List of ILogEvent from oldest to newest (not null)