Kieker 1.12

kieker.common.logging
Class LogImplWebguiLogging

java.lang.Object
  extended by kieker.common.logging.LogImplWebguiLogging
All Implemented Interfaces:
Log

public final class LogImplWebguiLogging
extends java.lang.Object
implements Log

This is a simple logger for the Kieker WebGUI. It stores the log messages within a buffer of a static size. If the buffer is full, the oldest entry will be removed for new entries. As the entries have to be accessible from outside, the queues are stored statically.

Since:
1.6
Author:
Jan Waller, Nils Christian Ehmke

Constructor Summary
protected LogImplWebguiLogging(java.lang.String name)
          Creates a new instance of this class.
 
Method Summary
 void clear()
          Clears the saved entries within this logger.
 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.
static java.lang.String[] getAvailableLogs()
          Delivers an array with the names of all used loggers.
static java.lang.String[] getEntries(java.lang.String name)
          Delivers an array with all entries of the logger with the given name.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogImplWebguiLogging

protected LogImplWebguiLogging(java.lang.String name)
Creates a new instance of this class.

Parameters:
name - The name of the logger.
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Description copied from interface: Log

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.

Specified by:
isTraceEnabled in interface Log
Returns:
true if trace is enabled in the underlying logger.

trace

public void trace(java.lang.String message)
Description copied from interface: Log

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. Log.debug(String)).

Specified by:
trace in interface Log
Parameters:
message - log this message

trace

public void trace(java.lang.String message,
                  java.lang.Throwable t)
Description copied from interface: Log

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. Log.debug(String, Throwable)).

Specified by:
trace in interface Log
Parameters:
message - log this message
t - log this cause

isDebugEnabled

public 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.

Specified by:
isDebugEnabled in interface Log
Returns:
true if debug is enabled in the underlying logger.

debug

public 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. Log.trace(String)).

Specified by:
debug in interface Log
Parameters:
message - log this message

debug

public 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. Log.trace(String, Throwable)).

Specified by:
debug in interface Log
Parameters:
message - log this message
t - log this cause

info

public void info(java.lang.String message)

Log a message with info log level.

Use this log level for the production mode.

Specified by:
info in interface Log
Parameters:
message - log this message

info

public 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.

Specified by:
info in interface Log
Parameters:
message - log this message
t - log this cause

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: Log

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.

Specified by:
isWarnEnabled in interface Log
Returns:
true if warn is enabled in the underlying logger.

warn

public void warn(java.lang.String message)

Log a message with warn log level.

Use this log level for the production mode.

Specified by:
warn in interface Log
Parameters:
message - log this message

warn

public 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.

Specified by:
warn in interface Log
Parameters:
message - log this message
t - log this cause

error

public void error(java.lang.String message)

Log a message with error log level.

Use this log level for the production mode.

Specified by:
error in interface Log
Parameters:
message - log this message

error

public 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.

Specified by:
error in interface Log
Parameters:
message - log this message
t - log this cause

clear

public void clear()
Clears the saved entries within this logger.


getAvailableLogs

public static java.lang.String[] getAvailableLogs()
Delivers an array with the names of all used loggers.

Returns:
The available log names.

getEntries

public static java.lang.String[] getEntries(java.lang.String name)
Delivers an array with all entries of the logger with the given name.

Parameters:
name - The name of the logger.
Returns:
The stored entries of the logger. If a logger with the given name doesn't exist, an empty array will be returned.

Kieker 1.12

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