Class Log.InternalLogger

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<LogInterface>, java.util.Collection<LogInterface>, java.util.List<LogInterface>, java.util.RandomAccess
    Enclosing class:
    Log

    public static class Log.InternalLogger
    extends java.util.Vector<LogInterface>
    A collection of loggers.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.Vector

        capacityIncrement, elementCount, elementData
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      InternalLogger()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addLogger​(LogInterface logger)
      Adds the logger object to the collection of loggers.
      void close()
      Free up all resources the loggers use and remove them from the collection.
      void debug​(java.lang.String str)
      Logs a message with level debug for each logger in the collection.
      boolean equals​(java.lang.Object logger)
      Checks whether the logger object and this InternalLogger are equal.
      void error​(java.lang.String str)
      Log a message with level error for each logger in the collection.
      void error​(java.lang.String str, java.lang.Throwable error)
      Log a message with level error, and an additional Throwable.
      void fatal​(java.lang.String str)
      Log a message with level fatal for each logger in the collection.
      void fatal​(java.lang.String str, java.lang.Throwable error)
      Log a message with level fatal, and an additional Throwable.
      int hashCode()
      Returns an integer hash code.
      void info​(java.lang.String str)
      Log a message with level info for each logger in the collection.
      boolean isDebugEnabled()
      Check if a debug message would be logged by any of the loggers.
      boolean isEnabledForAll()
      Deprecated. 
      void log​(java.lang.String level, java.lang.String str)
      Log a message with the specified level for each logger in the collection.
      void removeLogger​(LogInterface logger)
      Removes a logger from the collection.
      void warn​(java.lang.String str)
      Log a message with level warning for each logger in the collection.
      • Methods inherited from class java.util.Vector

        add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
    • Constructor Detail

      • InternalLogger

        public InternalLogger()
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object logger)
        Checks whether the logger object and this InternalLogger are equal.
        Specified by:
        equals in interface java.util.Collection<LogInterface>
        Specified by:
        equals in interface java.util.List<LogInterface>
        Overrides:
        equals in class java.util.Vector<LogInterface>
        Parameters:
        logger - the object to compare with this object
        Returns:
        true if they are equal, otherwise false
      • hashCode

        public int hashCode()
        Returns an integer hash code. Any two objects which answer true when passed to equals must answer the same value for this method.
        Specified by:
        hashCode in interface java.util.Collection<LogInterface>
        Specified by:
        hashCode in interface java.util.List<LogInterface>
        Overrides:
        hashCode in class java.util.Vector<LogInterface>
        Returns:
        an integer hash code
      • addLogger

        public void addLogger​(LogInterface logger)
        Adds the logger object to the collection of loggers.
        Parameters:
        logger - the object to add
      • removeLogger

        public void removeLogger​(LogInterface logger)
        Removes a logger from the collection.
        Parameters:
        logger - the object we want to remove
      • debug

        public void debug​(java.lang.String str)
        Logs a message with level debug for each logger in the collection.
        Parameters:
        str - the string to be logged
      • info

        public void info​(java.lang.String str)
        Log a message with level info for each logger in the collection.
        Parameters:
        str - The string to be logged
      • warn

        public void warn​(java.lang.String str)
        Log a message with level warning for each logger in the collection.
        Parameters:
        str - The string to be logged
      • error

        public void error​(java.lang.String str)
        Log a message with level error for each logger in the collection.
        Parameters:
        str - The string to be logged
      • error

        public void error​(java.lang.String str,
                          java.lang.Throwable error)
        Log a message with level error, and an additional Throwable. This is done for each logger in the collection.
        Parameters:
        str - The string to be logged
        error - The Throwable to be logged
      • fatal

        public void fatal​(java.lang.String str)
        Log a message with level fatal for each logger in the collection.
        Parameters:
        str - The string to be logged
      • fatal

        public void fatal​(java.lang.String str,
                          java.lang.Throwable error)
        Log a message with level fatal, and an additional Throwable. This is done for each logger in the collection.
        Parameters:
        str - The string to be logged
        error - The Throwable to be logged
      • log

        public void log​(java.lang.String level,
                        java.lang.String str)
        Log a message with the specified level for each logger in the collection.
        Parameters:
        level - The level to use when logging
        str - The string to be logged
      • isDebugEnabled

        public boolean isDebugEnabled()
        Check if a debug message would be logged by any of the loggers.
        Returns:
        true if a debug message might be logged.
      • isEnabledForAll

        @Deprecated
        public boolean isEnabledForAll()
        Deprecated.
        Returns:
        a boolean value
      • close

        public void close()
        Free up all resources the loggers use and remove them from the collection. They will not be called anymore.