edu.isi.pegasus.common.logging.format
public abstract class AbstractLogFormatter extends Object implements LogFormatter
| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAULT_KEY
The default key to use for logging messages
|
protected String |
mProgram
The name of the program.
|
protected Stack<Event> |
mStack
The Stack of event objects maintained internally
|
| Constructor and Description |
|---|
AbstractLogFormatter()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
LogFormatter |
add(String value)
Add to the log message with just a value.
|
LogFormatter |
add(String key,
String value)
Add to the log message for the event on the top.
|
abstract void |
addEvent(String name,
String entityName,
String entityID)
Adds the event that is to be associated with the log messages onto an
internal stack
|
String |
createEntityHierarchyMessage(String parentType,
String parentID,
String childIdType,
Collection<String> childIDs)
Creates a log message that connects the parent entities with the
children.
|
String |
createLogMessage()
Creates a log message with the contents of the internal log buffer.
|
String |
createLogMessageAndReset()
Creates a log message with the contents of the internal log buffer.
|
String |
getEndEventMessage()
Creates the end message for the event on top of the stack.
|
String |
getEventName()
Returns the name of event that is currently associated with the log messages
and is on the top of the stack
|
String |
getProgramName(String name)
Returns the program name for the software whose log statement are logged.
|
String |
getStartEventMessage()
Creates the start message for the event on top of the internal stack
|
Event |
popEvent()
Pop the event on top of the internal stack.
|
void |
setProgramName(String name)
Sets the program name for the software whose log statement are logged.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventprivate static String DEFAULT_KEY
protected String mProgram
public void setProgramName(String name)
setProgramName in interface LogFormattername - public String getProgramName(String name)
getProgramName in interface LogFormattername - public abstract void addEvent(String name, String entityName, String entityID)
addEvent in interface LogFormattername - the name of the event to be associatedentityName - the primary entity that is associated with the event e.g. workflowentityID - the id of that entity.public Event popEvent()
popEvent in interface LogFormatterpublic String getEventName()
getEventName in interface LogFormatterpublic String getStartEventMessage()
getStartEventMessage in interface LogFormatterpublic String getEndEventMessage()
getEndEventMessage in interface LogFormatterpublic LogFormatter add(String value)
add in interface LogFormattervalue - public LogFormatter add(String key, String value)
add in interface LogFormatterkey - value - public String createLogMessage()
createLogMessage in interface LogFormatterpublic String createLogMessageAndReset()
createLogMessageAndReset in interface LogFormatterpublic String createEntityHierarchyMessage(String parentType, String parentID, String childIdType, Collection<String> childIDs)
createEntityHierarchyMessage in interface LogFormatterparentType - the type of parent entityparentID - the id of the parent entitychildIdType - the type of children entitieschildIDs - Collection of children id's