Kieker 1.12

kieker.common.logging
Interface Log

All Known Implementing Classes:
LogImplCommonsLogging, LogImplJDK14, LogImplJUnit, LogImplNone, LogImplSLF4JLogging, LogImplWebguiLogging

public interface Log

A simple logging interface abstracting logging APIs.

The five logging levels used by Log are (in order):

  1. trace (the least serious)
  2. debug
  3. info
  4. warn
  5. error (the most serious)

Since:
1.5
Author:
Jan Waller, Christian Wulf

Method Summary
 void debug(java.lang.String message)
           Log a message with debug log level.
 void debug(java.lang.String message, java.lang.Throwable t)
           Log an error with debug log level.
 void error(java.lang.String message)
           Log a message with error log level.
 void error(java.lang.String message, java.lang.Throwable t)
           Log an error with error log level.
 void info(java.lang.String message)
           Log a message with info log level.
 void info(java.lang.String message, java.lang.Throwable t)
           Log an error with info log level.
 boolean isDebugEnabled()
           Is debug logging currently enabled?
 boolean isTraceEnabled()
           Is trace logging currently enabled?
 boolean isWarnEnabled()
           Is warn logging currently enabled?
 void trace(java.lang.String message)
           Log a message with trace log level.
 void trace(java.lang.String message, java.lang.Throwable t)
           Log an error with trace log level.
 void warn(java.lang.String message)
           Log a message with warn log level.
 void warn(java.lang.String message, java.lang.Throwable t)
           Log an error with warn log level.
 

Method Detail

isTraceEnabled

boolean isTraceEnabled()

Is trace logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than trace.

Returns:
true if trace is enabled in the underlying logger.
Since:
1.10

trace

void trace(java.lang.String message)

Log a message with trace log level.

Use this log level for the development mode to log a single step, e.g., "Loaded user 'Helen'" (cf. debug(String)).

Parameters:
message - log this message
Since:
1.10

trace

void trace(java.lang.String message,
           java.lang.Throwable t)

Log an error with trace log level.

Use this log level for the development mode to log a single step, e.g., "Loaded user 'Helen'" (cf. debug(String, Throwable)).

Parameters:
message - log this message
t - log this cause
Since:
1.10

isDebugEnabled

boolean isDebugEnabled()

Is debug logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than debug.

Returns:
true if debug is enabled in the underlying logger.
Since:
1.5

debug

void debug(java.lang.String message)

Log a message with debug log level.

Use this log level for the development mode to log a set of single steps, e.g., "Loaded 10 users from file" (cf. trace(String)).

Parameters:
message - log this message
Since:
1.5

debug

void debug(java.lang.String message,
           java.lang.Throwable t)

Log an error with debug log level.

Use this log level for the development mode to log a set of single steps, e.g., "Loaded 10 users from file" (cf. trace(String, Throwable)).

Parameters:
message - log this message
t - log this cause
Since:
1.5

info

void info(java.lang.String message)

Log a message with info log level.

Use this log level for the production mode.

Parameters:
message - log this message
Since:
1.5

info

void info(java.lang.String message,
          java.lang.Throwable t)

Log an error with info log level.

Use this log level for the production mode.

Parameters:
message - log this message
t - log this cause
Since:
1.5

isWarnEnabled

boolean isWarnEnabled()

Is warn logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than warn.

Returns:
true if warn is enabled in the underlying logger.
Since:
1.12

warn

void warn(java.lang.String message)

Log a message with warn log level.

Use this log level for the production mode.

Parameters:
message - log this message
Since:
1.5

warn

void warn(java.lang.String message,
          java.lang.Throwable t)

Log an error with warn log level.

Use this log level for the production mode.

Parameters:
message - log this message
t - log this cause
Since:
1.5

error

void error(java.lang.String message)

Log a message with error log level.

Use this log level for the production mode.

Parameters:
message - log this message
Since:
1.5

error

void error(java.lang.String message,
           java.lang.Throwable t)

Log an error with error log level.

Use this log level for the production mode.

Parameters:
message - log this message
t - log this cause
Since:
1.5

Kieker 1.12

Copyright 2015 Kieker Project, http://kieker-monitoring.net