Interface Log

All Superinterfaces:
AutoCloseable, Closeable, Filtered<LogEntry>, Flushable, Named
All Known Implementing Classes:
BaseLog, BaseTextLog, ConsoleLog

public interface Log extends Named, Filtered<LogEntry>, Closeable, Flushable
Accepts log entries for some purpose, such as writing them to a file or displaying them in a terminal window. Logger implementations write log entries to one or more Logs via log(LogEntry). Which log entries are logged can be controlled with filters returned from Filtered.filters() and by setting a minimum severity level with level(Severity). Some logs are configurable with a string-to-string property map via configure(Map). Logs are also Closeable, Flushable and Named.

Wiki Documentation

For a detailed discussion of KivaKit logging, see the KivaKit logging documentation on the wiki.

Implementations

There are a variety of Log implementations, including:

  • ConsoleLog - Logs to System.out and System.err
  • EmailLog - Sends (typically high severity) log entries as emails
  • ServerLog - Makes log entries available to a client
  • FileLog - Logs entries to one or more files
Which log implementation(s) are used in an application can be selected from the command line with the system property KIVAKIT_LOG (see KivaKit logging documentation for details).
Author:
jonathanl (shibo)
See Also:
Logger, Filtered, Named, Flushable, Closeable, KivaKit logging documentation
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure​(Map<String,​String> properties)
    Configures the log
    void
    level​(Severity severity)
    Sets the "log level"
    void
    log​(LogEntry entry)
    Logs the given entry

    Methods inherited from interface com.telenav.kivakit.kernel.interfaces.io.Closeable

    close

    Methods inherited from interface com.telenav.kivakit.kernel.interfaces.comparison.Filtered

    filters

    Methods inherited from interface com.telenav.kivakit.kernel.interfaces.io.Flushable

    flush, flush

    Methods inherited from interface com.telenav.kivakit.kernel.interfaces.naming.Named

    name
  • Method Details

    • configure

      void configure(Map<String,​String> properties)
      Configures the log
      Parameters:
      properties - A property map specific to the type of log
    • level

      void level(Severity severity)
      Sets the "log level"
      Parameters:
      severity - The minimum severity of entries to log
    • log

      void log(LogEntry entry)
      Logs the given entry