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 LogChannelInterface
GENERAL
static String
GENERAL_SUBJECT
static String
GUI_SUBJECT
static LogChannelInterface
METADATA
static String
METADATA_SUBJECT
static LogChannelInterface
UI
-
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 String
getContainerObjectId()
String
getFilter()
LoggingObjectLifecycleInterface
getHooks()
String
getLogChannelId()
LogLevel
getLogLevel()
boolean
isBasic()
boolean
isDebug()
boolean
isDetailed()
boolean
isError()
boolean
isForcingSeparateLogging()
boolean
isGatheringMetrics()
boolean
isRowLevel()
void
logBasic(String s)
void
logBasic(String s, Object... arguments)
void
logDebug(String s)
void
logDebug(String message, Object... arguments)
void
logDetailed(String s)
void
logDetailed(String s, Object... arguments)
void
logError(String s)
void
logError(String s, Object... arguments)
void
logError(String s, Throwable e)
void
logMinimal(String s)
void
logMinimal(String message, Object... arguments)
void
logRowlevel(String s)
void
logRowlevel(String message, Object... arguments)
void
println(LogMessageInterface message, Throwable e, LogLevel channelLogLevel)
void
println(LogMessageInterface logMessage, LogLevel channelLogLevel)
void
setContainerObjectId(String containerObjectId)
void
setFilter(String filter)
void
setForcingSeparateLogging(boolean forcingSeparateLogging)
This option will force the create of a separate logging channel even if the logging concerns identical objects with identical names.void
setGatheringMetrics(boolean gatheringMetrics)
void
setHooks(LoggingObjectLifecycleInterface loggingObjectLifecycleInterface)
void
setLogLevel(LogLevel logLevel)
void
snap(MetricsInterface metric, long... value)
Add a snapshot to the metrics system for this log channel at the time of invocation.void
snap(MetricsInterface metric, String subject, long... value)
Add a maximum snapshot to the metrics system for this log channel at the time of invocation.String
toString()
-
-
-
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:
getLogChannelId
in 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:
logMinimal
in interfaceLogChannelInterface
-
logBasic
public void logBasic(String s)
- Specified by:
logBasic
in interfaceLogChannelInterface
-
logError
public void logError(String s)
- Specified by:
logError
in interfaceLogChannelInterface
-
logError
public void logError(String s, Throwable e)
- Specified by:
logError
in interfaceLogChannelInterface
-
logBasic
public void logBasic(String s, Object... arguments)
- Specified by:
logBasic
in interfaceLogChannelInterface
-
logDetailed
public void logDetailed(String s, Object... arguments)
- Specified by:
logDetailed
in interfaceLogChannelInterface
-
logError
public void logError(String s, Object... arguments)
- Specified by:
logError
in interfaceLogChannelInterface
-
logDetailed
public void logDetailed(String s)
- Specified by:
logDetailed
in interfaceLogChannelInterface
-
logDebug
public void logDebug(String s)
- Specified by:
logDebug
in interfaceLogChannelInterface
-
logDebug
public void logDebug(String message, Object... arguments)
- Specified by:
logDebug
in interfaceLogChannelInterface
-
logRowlevel
public void logRowlevel(String s)
- Specified by:
logRowlevel
in interfaceLogChannelInterface
-
logMinimal
public void logMinimal(String message, Object... arguments)
- Specified by:
logMinimal
in interfaceLogChannelInterface
-
logRowlevel
public void logRowlevel(String message, Object... arguments)
- Specified by:
logRowlevel
in interfaceLogChannelInterface
-
isBasic
public boolean isBasic()
- Specified by:
isBasic
in interfaceLogChannelInterface
-
isDebug
public boolean isDebug()
- Specified by:
isDebug
in interfaceLogChannelInterface
-
isDetailed
public boolean isDetailed()
- Specified by:
isDetailed
in interfaceLogChannelInterface
-
isRowLevel
public boolean isRowLevel()
- Specified by:
isRowLevel
in interfaceLogChannelInterface
-
isError
public boolean isError()
- Specified by:
isError
in interfaceLogChannelInterface
-
getLogLevel
public LogLevel getLogLevel()
- Specified by:
getLogLevel
in interfaceLogChannelInterface
-
setLogLevel
public void setLogLevel(LogLevel logLevel)
- Specified by:
setLogLevel
in interfaceLogChannelInterface
-
getContainerObjectId
public String getContainerObjectId()
- Specified by:
getContainerObjectId
in interfaceLogChannelInterface
- Returns:
- the containerObjectId
-
setContainerObjectId
public void setContainerObjectId(String containerObjectId)
- Specified by:
setContainerObjectId
in interfaceLogChannelInterface
- Parameters:
containerObjectId
- the containerObjectId to set
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetrics
in interfaceLogChannelInterface
- Returns:
- the gatheringMetrics
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetrics
in interfaceLogChannelInterface
- Parameters:
gatheringMetrics
- the gatheringMetrics to set
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLogging
in interfaceLogChannelInterface
- Returns:
- True if the logging is forcibly separated out from even identical objects.
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
Description copied from interface:LogChannelInterface
This option will force the create of a separate logging channel even if the logging concerns identical objects with identical names.- Specified by:
setForcingSeparateLogging
in interfaceLogChannelInterface
- Parameters:
forcingSeparateLogging
- Set to true to force separate logging
-
snap
public void snap(MetricsInterface metric, long... value)
Description copied from interface:LogChannelInterface
Add 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:
snap
in 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:LogChannelInterface
Add 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:
snap
in 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:
getFilter
in interfaceLogChannelInterface
-
setFilter
public void setFilter(String filter)
- Specified by:
setFilter
in interfaceLogChannelInterface
-
getHooks
public LoggingObjectLifecycleInterface getHooks()
- Specified by:
getHooks
in interfaceLogChannelInterface
-
setHooks
public void setHooks(LoggingObjectLifecycleInterface loggingObjectLifecycleInterface)
- Specified by:
setHooks
in interfaceLogChannelInterface
-
-