java.lang.Object
provided.logger.util.AStringLogEntryProcessor
- All Implemented Interfaces:
ILogEntryProcessor
,IStringLogEntryProcessor
A abstract mutable IStringLogEntryProcessor class that enables the string formatter in use to be both accessed and changed.
This class provides the internal storage for the ILogEntryFormatter in use. Note: The use of this class is not always feasible
in some situations, particularly due to the multiple inheritance limitations of Java.
- Author:
- swong
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ILogEntryFormatter
The log entry formatter currently in use. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an instance using the ILogEntryFormatter.DEFAULT formatter.AStringLogEntryProcessor(ILogEntryFormatter leFormatter)
Construct an instance that uses the given log entry formatter. -
Method Summary
Modifier and TypeMethodDescriptionGet the current log entry formatter in usestatic IStringLogEntryProcessor
Static factory to instantiate an AStringLogEntryProcessor instance using the ILogEntryFormatter.DEFAULT formatter.static IStringLogEntryProcessor
MakeDefault(ILogEntryFormatter leFormatter)
Static factory to instantiate an AStringLogEntryProcessor instance using the given ILogEntryFormatter.void
setLogEntryFormatter(ILogEntryFormatter leFormatter)
Set the log entry formatter in use to be the given formatterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface provided.logger.ILogEntryProcessor
accept
-
Field Details
-
leFormatter
The log entry formatter currently in use.
-
-
Constructor Details
-
AStringLogEntryProcessor
public AStringLogEntryProcessor()Construct an instance using the ILogEntryFormatter.DEFAULT formatter. -
AStringLogEntryProcessor
Construct an instance that uses the given log entry formatter.- Parameters:
leFormatter
- The initial log entry formatter to use.
-
-
Method Details
-
setLogEntryFormatter
Set the log entry formatter in use to be the given formatter- Specified by:
setLogEntryFormatter
in interfaceIStringLogEntryProcessor
- Parameters:
leFormatter
- The new log entry formatter to use
-
getLogEntryFormatter
Get the current log entry formatter in use- Specified by:
getLogEntryFormatter
in interfaceIStringLogEntryProcessor
- Returns:
- The log entry formatter in use
-
MakeDefault
Static factory to instantiate an AStringLogEntryProcessor instance using the ILogEntryFormatter.DEFAULT formatter. Output goes to the console where LogLevel.ERROR level is printed to stderr and other levels are printed to stdout.- Returns:
- An IStringLogEntryFormatter instance initially
-
MakeDefault
Static factory to instantiate an AStringLogEntryProcessor instance using the given ILogEntryFormatter. Output goes to the console where LogLevel.ERROR level is printed to stderr and other levels are printed to stdout.- Parameters:
leFormatter
- The log entry formatter to use initially- Returns:
- An IStringLogEntryFormatter instance
-