Package org.pentaho.di.core.logging
Class LogChannel
- java.lang.Object
-
- org.pentaho.di.core.logging.LogChannel
-
- All Implemented Interfaces:
LogChannelInterface
public class LogChannel extends Object implements LogChannelInterface
-
-
Field Summary
Fields Modifier and Type Field Description static LogChannelInterfaceGENERALstatic StringGENERAL_SUBJECTstatic StringGUI_SUBJECTstatic LogChannelInterfaceMETADATAstatic StringMETADATA_SUBJECTstatic LogChannelInterfaceUI
-
Constructor Summary
Constructors Constructor Description LogChannel()LogChannel(Object subject)LogChannel(Object subject, boolean gatheringMetrics)LogChannel(Object subject, boolean gatheringMetrics, boolean isPurgeable)LogChannel(Object subject, LoggingObjectInterface parentObject)LogChannel(Object subject, LoggingObjectInterface parentObject, boolean gatheringMetrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContainerObjectId()StringgetFilter()LoggingObjectLifecycleInterfacegetHooks()StringgetLogChannelId()LogLevelgetLogLevel()booleanisBasic()booleanisDebug()booleanisDetailed()booleanisError()booleanisForcingSeparateLogging()booleanisGatheringMetrics()booleanisRowLevel()voidlogBasic(String s)voidlogBasic(String s, Object... arguments)voidlogDebug(String s)voidlogDebug(String message, Object... arguments)voidlogDetailed(String s)voidlogDetailed(String s, Object... arguments)voidlogError(String s)voidlogError(String s, Object... arguments)voidlogError(String s, Throwable e)voidlogMinimal(String s)voidlogMinimal(String message, Object... arguments)voidlogRowlevel(String s)voidlogRowlevel(String message, Object... arguments)voidprintln(LogMessageInterface message, Throwable e, LogLevel channelLogLevel)voidprintln(LogMessageInterface logMessage, LogLevel channelLogLevel)voidsetContainerObjectId(String containerObjectId)voidsetFilter(String filter)voidsetForcingSeparateLogging(boolean forcingSeparateLogging)This option will force the create of a separate logging channel even if the logging concerns identical objects with identical names.voidsetGatheringMetrics(boolean gatheringMetrics)voidsetHooks(LoggingObjectLifecycleInterface loggingObjectLifecycleInterface)voidsetLogLevel(LogLevel logLevel)voidsnap(MetricsInterface metric, long... value)Add a snapshot to the metrics system for this log channel at the time of invocation.voidsnap(MetricsInterface metric, String subject, long... value)Add a maximum snapshot to the metrics system for this log channel at the time of invocation.StringtoString()
-
-
-
Field Detail
-
GENERAL_SUBJECT
public static final String GENERAL_SUBJECT
- See Also:
- Constant Field Values
-
METADATA_SUBJECT
public static final String METADATA_SUBJECT
- See Also:
- Constant Field Values
-
GUI_SUBJECT
public static final String GUI_SUBJECT
- See Also:
- Constant Field Values
-
GENERAL
public static final LogChannelInterface GENERAL
-
METADATA
public static final LogChannelInterface METADATA
-
UI
public static final LogChannelInterface UI
-
-
Constructor Detail
-
LogChannel
public LogChannel()
-
LogChannel
public LogChannel(Object subject)
-
LogChannel
public LogChannel(Object subject, boolean gatheringMetrics)
-
LogChannel
public LogChannel(Object subject, boolean gatheringMetrics, boolean isPurgeable)
-
LogChannel
public LogChannel(Object subject, LoggingObjectInterface parentObject)
-
LogChannel
public LogChannel(Object subject, LoggingObjectInterface parentObject, boolean gatheringMetrics)
-
-
Method Detail
-
getLogChannelId
public String getLogChannelId()
- Specified by:
getLogChannelIdin interfaceLogChannelInterface- Returns:
- the id of the logging channel
-
println
public void println(LogMessageInterface logMessage, LogLevel channelLogLevel)
-
println
public void println(LogMessageInterface message, Throwable e, LogLevel channelLogLevel)
-
logMinimal
public void logMinimal(String s)
- Specified by:
logMinimalin interfaceLogChannelInterface
-
logBasic
public void logBasic(String s)
- Specified by:
logBasicin interfaceLogChannelInterface
-
logError
public void logError(String s)
- Specified by:
logErrorin interfaceLogChannelInterface
-
logError
public void logError(String s, Throwable e)
- Specified by:
logErrorin interfaceLogChannelInterface
-
logBasic
public void logBasic(String s, Object... arguments)
- Specified by:
logBasicin interfaceLogChannelInterface
-
logDetailed
public void logDetailed(String s, Object... arguments)
- Specified by:
logDetailedin interfaceLogChannelInterface
-
logError
public void logError(String s, Object... arguments)
- Specified by:
logErrorin interfaceLogChannelInterface
-
logDetailed
public void logDetailed(String s)
- Specified by:
logDetailedin interfaceLogChannelInterface
-
logDebug
public void logDebug(String s)
- Specified by:
logDebugin interfaceLogChannelInterface
-
logDebug
public void logDebug(String message, Object... arguments)
- Specified by:
logDebugin interfaceLogChannelInterface
-
logRowlevel
public void logRowlevel(String s)
- Specified by:
logRowlevelin interfaceLogChannelInterface
-
logMinimal
public void logMinimal(String message, Object... arguments)
- Specified by:
logMinimalin interfaceLogChannelInterface
-
logRowlevel
public void logRowlevel(String message, Object... arguments)
- Specified by:
logRowlevelin interfaceLogChannelInterface
-
isBasic
public boolean isBasic()
- Specified by:
isBasicin interfaceLogChannelInterface
-
isDebug
public boolean isDebug()
- Specified by:
isDebugin interfaceLogChannelInterface
-
isDetailed
public boolean isDetailed()
- Specified by:
isDetailedin interfaceLogChannelInterface
-
isRowLevel
public boolean isRowLevel()
- Specified by:
isRowLevelin interfaceLogChannelInterface
-
isError
public boolean isError()
- Specified by:
isErrorin interfaceLogChannelInterface
-
getLogLevel
public LogLevel getLogLevel()
- Specified by:
getLogLevelin interfaceLogChannelInterface
-
setLogLevel
public void setLogLevel(LogLevel logLevel)
- Specified by:
setLogLevelin interfaceLogChannelInterface
-
getContainerObjectId
public String getContainerObjectId()
- Specified by:
getContainerObjectIdin interfaceLogChannelInterface- Returns:
- the containerObjectId
-
setContainerObjectId
public void setContainerObjectId(String containerObjectId)
- Specified by:
setContainerObjectIdin interfaceLogChannelInterface- Parameters:
containerObjectId- the containerObjectId to set
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetricsin interfaceLogChannelInterface- Returns:
- the gatheringMetrics
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetricsin interfaceLogChannelInterface- Parameters:
gatheringMetrics- the gatheringMetrics to set
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLoggingin interfaceLogChannelInterface- Returns:
- True if the logging is forcibly separated out from even identical objects.
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
Description copied from interface:LogChannelInterfaceThis option will force the create of a separate logging channel even if the logging concerns identical objects with identical names.- Specified by:
setForcingSeparateLoggingin interfaceLogChannelInterface- Parameters:
forcingSeparateLogging- Set to true to force separate logging
-
snap
public void snap(MetricsInterface metric, long... value)
Description copied from interface:LogChannelInterfaceAdd a snapshot to the metrics system for this log channel at the time of invocation. This will process the value depending on the type of metric specified. For example, for MetricsInterface.look up the maximum value in the metrics and replace it if the new value is higher. The snapshot date will be retained in that case.- Specified by:
snapin interfaceLogChannelInterface- Parameters:
metric- The metric to use (ex. connect to a database)value- the value to store
-
snap
public void snap(MetricsInterface metric, String subject, long... value)
Description copied from interface:LogChannelInterfaceAdd a maximum snapshot to the metrics system for this log channel at the time of invocation. This will look up the maximum value in the metrics and replace it if the new value is higher. The snapshot date will be retained in that case.- Specified by:
snapin interfaceLogChannelInterface- Parameters:
metric- The metric to use (ex. connect to a database)subject- The subject (ex. the name of the database)value- the value to store
-
getFilter
public String getFilter()
- Specified by:
getFilterin interfaceLogChannelInterface
-
setFilter
public void setFilter(String filter)
- Specified by:
setFilterin interfaceLogChannelInterface
-
getHooks
public LoggingObjectLifecycleInterface getHooks()
- Specified by:
getHooksin interfaceLogChannelInterface
-
setHooks
public void setHooks(LoggingObjectLifecycleInterface loggingObjectLifecycleInterface)
- Specified by:
setHooksin interfaceLogChannelInterface
-
-