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 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
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object logger)
Checks whether the logger object and this InternalLogger are equal.- Specified by:
equals
in interfacejava.util.Collection<LogInterface>
- Specified by:
equals
in interfacejava.util.List<LogInterface>
- Overrides:
equals
in classjava.util.Vector<LogInterface>
- Parameters:
logger
- the object to compare with this object- Returns:
true
if they are equal, otherwisefalse
-
hashCode
public int hashCode()
Returns an integer hash code. Any two objects which answertrue
when passed toequals
must answer the same value for this method.- Specified by:
hashCode
in interfacejava.util.Collection<LogInterface>
- Specified by:
hashCode
in interfacejava.util.List<LogInterface>
- Overrides:
hashCode
in 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.
-
-