Class Channel

java.lang.Object
com.reposilite.journalist.Channel
All Implemented Interfaces:
Comparable<Channel>

public class Channel extends Object implements Comparable<Channel>
Channel represents level of logging. List of predefined channels with their priorities: The higher priority is, the the more important type of information it represents.
  • Field Details

    • ALL

      public static final Channel ALL
      Represents all logging level with positive priority. You cannot log to this channel, but you can use it as a lowest possible threshold.
    • FATAL

      public static final Channel FATAL
    • ERROR

      public static final Channel ERROR
    • WARN

      public static final Channel WARN
    • INFO

      public static final Channel INFO
    • DEBUG

      public static final Channel DEBUG
    • TRACE

      public static final Channel TRACE
  • Constructor Details

  • Method Details

    • compareTo

      public int compareTo(Channel to)
      Specified by:
      compareTo in interface Comparable<Channel>
    • equals

      public boolean equals(Object to)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIntention

      public ChannelIntention getIntention()
      Get the estimated intention of channel
      Returns:
      channel intention
    • getPriority

      public double getPriority()
      Get the priority of channel
      Returns:
      channel priority
    • getName

      public String getName()
      Get the name of channel
      Returns:
      channel name
    • of

      public static Optional<Channel> of(String channel)
      Find channel using its string representation. This method supports only predefined channels.
      Parameters:
      channel - the channel to look for
      Returns:
      the lookup result
    • getPredefinedChannels

      public static Set<Channel> getPredefinedChannels()
      Get predefined channels as set
      Returns:
      a copy of predefined channels set