Package com.ibm.di.server
Class Log.InternalLogger
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<LogInterface>
-
- com.ibm.di.server.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
-
-
Constructor Summary
Constructors Constructor Description InternalLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddLogger(LogInterface logger)Adds the logger object to the collection of loggers.voidclose()Free up all resources the loggers use and remove them from the collection.voiddebug(java.lang.String str)Logs a message with level debug for each logger in the collection.booleanequals(java.lang.Object logger)Checks whether the logger object and this InternalLogger are equal.voiderror(java.lang.String str)Log a message with level error for each logger in the collection.voiderror(java.lang.String str, java.lang.Throwable error)Log a message with level error, and an additional Throwable.voidfatal(java.lang.String str)Log a message with level fatal for each logger in the collection.voidfatal(java.lang.String str, java.lang.Throwable error)Log a message with level fatal, and an additional Throwable.inthashCode()Returns an integer hash code.voidinfo(java.lang.String str)Log a message with level info for each logger in the collection.booleanisDebugEnabled()Check if a debug message would be logged by any of the loggers.booleanisEnabledForAll()Deprecated.voidlog(java.lang.String level, java.lang.String str)Log a message with the specified level for each logger in the collection.voidremoveLogger(LogInterface logger)Removes a logger from the collection.voidwarn(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
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object logger)
Checks whether the logger object and this InternalLogger are equal.- Specified by:
equalsin interfacejava.util.Collection<LogInterface>- Specified by:
equalsin interfacejava.util.List<LogInterface>- Overrides:
equalsin classjava.util.Vector<LogInterface>- Parameters:
logger- the object to compare with this object- Returns:
trueif they are equal, otherwisefalse
-
hashCode
public int hashCode()
Returns an integer hash code. Any two objects which answertruewhen passed toequalsmust answer the same value for this method.- Specified by:
hashCodein interfacejava.util.Collection<LogInterface>- Specified by:
hashCodein interfacejava.util.List<LogInterface>- Overrides:
hashCodein classjava.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 loggederror- 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 loggederror- 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 loggingstr- 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.
-
-