org.pentaho.di.core.logging
Class LoggingRegistry

java.lang.Object
  extended by org.pentaho.di.core.logging.LoggingRegistry

public class LoggingRegistry
extends Object

This singleton class contains the logging registry. It's a hash-map containing the hierarchy for a certain UUID that is generated when a job, job-entry, transformation or step is being created. With it, you can see for each log record to which step-mapping-xform-entry-job-job hiearchy it belongs.

Author:
matt

Method Summary
 String dump(boolean includeGeneral)
           
 LoggingObjectInterface findExistingLoggingSource(LoggingObjectInterface loggingObject)
          See if the registry already contains the specified logging object.
static LoggingRegistry getInstance()
           
 Date getLastModificationTime()
           
 List<String> getLogChannelChildren(String parentLogChannelId)
          In a situation where you have a job or transformation, you want to get a list of ALL the children where the parent is the channel ID.
 LoggingObjectInterface getLoggingObject(String logChannelId)
          Get the logging source object for a certain logging id
 Map<String,LoggingObjectInterface> getMap()
           
 String registerLoggingSource(Object object)
          This methods registers a new logging source, stores it in the registry.
 void removeIncludingChildren(String logChannelId)
          Removes the logging registry entry and all its children from the registry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LoggingRegistry getInstance()

registerLoggingSource

public String registerLoggingSource(Object object)
This methods registers a new logging source, stores it in the registry.

Parameters:
object - The logging source
int - The logging level for this logging source
Returns:
a new ID (UUID)

findExistingLoggingSource

public LoggingObjectInterface findExistingLoggingSource(LoggingObjectInterface loggingObject)
See if the registry already contains the specified logging object. If so, return the one in the registry. You can use this to verify existence prior to assigning a new channel ID.

Parameters:
loggingObject - The logging object to verify
Returns:
the existing object or null if none is present.

getLoggingObject

public LoggingObjectInterface getLoggingObject(String logChannelId)
Get the logging source object for a certain logging id

Parameters:
logChannelId - the logging channel id to look for
Returns:
the logging source of null if nothing was found

getMap

public Map<String,LoggingObjectInterface> getMap()

getLogChannelChildren

public List<String> getLogChannelChildren(String parentLogChannelId)
In a situation where you have a job or transformation, you want to get a list of ALL the children where the parent is the channel ID. The parent log channel ID is added

Parameters:
parentLogChannelId - The parent log channel ID
Returns:
the list of child channel ID

getLastModificationTime

public Date getLastModificationTime()

dump

public String dump(boolean includeGeneral)

removeIncludingChildren

public void removeIncludingChildren(String logChannelId)
Removes the logging registry entry and all its children from the registry.

Parameters:
logChannelId -