Class NetloggerEvent
- java.lang.Object
-
- edu.isi.pegasus.common.logging.format.NetloggerEvent
-
-
Field Summary
Fields Modifier and Type Field Description private LogEventmLogEventThe current event object.private EventLogMessagemMessageThe current log event message.private java.lang.StringmProgramThe name of the program.
-
Constructor Summary
Constructors Constructor Description NetloggerEvent()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Eventadd(java.lang.String key, java.lang.String value)Add to the log message.java.lang.StringcreateEntityHierarchyMessage(java.lang.String parentType, java.lang.String parentID, java.lang.String childIdType, java.util.Collection<java.lang.String> childIDs)Creates a log message that connects the parent entities with the children.java.lang.StringcreateLogMessage()Creates a log message with the contents of the internal log buffer.java.lang.StringcreateLogMessageAndReset()Creates a log message with the contents of the internal log buffer.java.lang.StringgetEndEventMessage()Creates the end message for the event.java.lang.StringgetEventName()Returns the name of event that is currently associated with the log messages.java.lang.StringgetProgramName(java.lang.String name)Returns the program name for the software whose log statement are logged.java.lang.StringgetStartEventMessage()Creates the start message for the event.voidreset()Reset the internal log message buffer associated with the eventvoidsetEvent(java.lang.String name, java.lang.String entityName, java.lang.String entityID)Set the event that is to be associated with the log messages.voidsetEvent(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> map)Adds the event that is to be associated with the log messages onto an internal stackvoidsetProgramName(java.lang.String name)Sets the program name for the software whose log statement are logged.
-
-
-
Field Detail
-
mProgram
private java.lang.String mProgram
The name of the program.
-
mLogEvent
private LogEvent mLogEvent
The current event object.
-
mMessage
private EventLogMessage mMessage
The current log event message.
-
-
Method Detail
-
setProgramName
public void setProgramName(java.lang.String name)
Sets the program name for the software whose log statement are logged.- Specified by:
setProgramNamein interfaceEvent- Parameters:
name-
-
getProgramName
public java.lang.String getProgramName(java.lang.String name)
Returns the program name for the software whose log statement are logged.- Specified by:
getProgramNamein interfaceEvent- Parameters:
name-- Returns:
- the name of the program
-
setEvent
public void setEvent(java.lang.String name, java.lang.String entityName, java.lang.String entityID)Set the event that is to be associated with the log messages.
-
setEvent
public void setEvent(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> map)Adds the event that is to be associated with the log messages onto an internal stack
-
getEventName
public java.lang.String getEventName()
Returns the name of event that is currently associated with the log messages.- Specified by:
getEventNamein interfaceEvent- Returns:
- the event to be associated
-
getStartEventMessage
public java.lang.String getStartEventMessage()
Creates the start message for the event.- Specified by:
getStartEventMessagein interfaceEvent- Returns:
- start event message
-
getEndEventMessage
public java.lang.String getEndEventMessage()
Creates the end message for the event.- Specified by:
getEndEventMessagein interfaceEvent- Returns:
- end event message
-
reset
public void reset()
Reset the internal log message buffer associated with the event
-
add
public Event add(java.lang.String key, java.lang.String value)
Add to the log message.
-
createLogMessage
public java.lang.String createLogMessage()
Creates a log message with the contents of the internal log buffer.- Specified by:
createLogMessagein interfaceEvent- Returns:
- the log message
-
createLogMessageAndReset
public java.lang.String createLogMessageAndReset()
Creates a log message with the contents of the internal log buffer. It then resets the buffer before returning the log message- Specified by:
createLogMessageAndResetin interfaceEvent- Returns:
- the log message
-
createEntityHierarchyMessage
public java.lang.String createEntityHierarchyMessage(java.lang.String parentType, java.lang.String parentID, java.lang.String childIdType, java.util.Collection<java.lang.String> childIDs)Creates a log message that connects the parent entities with the children. For e.g. can we use to create the log messages connecting the jobs with the workflow they are part of.- Specified by:
createEntityHierarchyMessagein interfaceEvent- Parameters:
parentType- the type of parent entityparentID- the id of the parent entitychildIdType- the type of children entitieschildIDs- Collection of children id's- Returns:
- entity hierarch message.
-
-