Package org.apache.nifi.logging
Interface ComponentLog
- All Known Implementing Classes:
NopComponentLog
public interface ComponentLog
The ComponentLog provides a mechanism to ensure that all NiFi components are logging and reporting information in a consistent way. When messages are logged to the ComponentLog, each message has the following characteristics:
-
The
toString()
of the component is automatically prepended to the message so that it is clear which component is providing the information. This is important, since a single component may have many different instances within the same NiFi instance. -
If the last value in an Object... argument that is passed to the logger is a
Throwable, then the logged message will include a
toString()
of the Throwable; in addition, if the component's logger is set to DEBUG level via the logback configuration, the Stacktrace will also be logged. This provides a mechanism to easily enable stacktraces in the logs when they are desired without filling the logs with unneeded stack traces for messages that end up occurring often. - Any message that is logged with a Severity level that meets or exceeds the configured Bulletin Level for that component will also cause a Bulletin to be generated, so that the message is visible in the UI, allowing Dataflow Managers to understand that a problem exists and what the issue is.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
default void
debug
(LogMessage logMessage) void
void
void
default void
error
(LogMessage logMessage) getName()
void
void
void
default void
info
(LogMessage logMessage) boolean
boolean
boolean
boolean
boolean
default void
default void
default void
default void
log
(LogLevel level, LogMessage logMessage) default void
log
(LogMessage message) void
void
void
default void
trace
(LogMessage logMessage) void
void
void
default void
warn
(LogMessage logMessage)
-
Method Details
-
warn
-
warn
-
warn
-
warn
-
trace
-
trace
-
trace
-
trace
-
isWarnEnabled
boolean isWarnEnabled() -
isTraceEnabled
boolean isTraceEnabled() -
isInfoEnabled
boolean isInfoEnabled() -
isErrorEnabled
boolean isErrorEnabled() -
isDebugEnabled
boolean isDebugEnabled() -
info
-
info
-
info
-
info
-
getName
String getName() -
error
-
error
-
error
-
error
-
debug
-
debug
-
debug
-
debug
-
log
-
log
-
log
-
log
-
log
-