org.universAAL.middleware.container
Interface LogListener

Package class diagram package LogListener

public interface LogListener

Listener interface for new log entries. The log listeners are called automatically when adding a log entry to LogUtils. To use this method, create a class (e.g. LogMonitor) that implements this interface and register the OSGi service, i.e.:

 context.registerService(new String[] { LogListener.class.getName() },
        new LogMonitor(), null);
 

Author:
Carsten Stockloew

Field Summary
static int LOG_LEVEL_DEBUG
           
static int LOG_LEVEL_ERROR
           
static int LOG_LEVEL_INFO
           
static int LOG_LEVEL_TRACE
           
static int LOG_LEVEL_WARN
           
 
Method Summary
 void log(int logLevel, String module, String pkg, String cls, String method, Object[] msgPart, Throwable t)
          Log a new message.
 

Field Detail

LOG_LEVEL_TRACE

static final int LOG_LEVEL_TRACE
See Also:
Constant Field Values

LOG_LEVEL_DEBUG

static final int LOG_LEVEL_DEBUG
See Also:
Constant Field Values

LOG_LEVEL_INFO

static final int LOG_LEVEL_INFO
See Also:
Constant Field Values

LOG_LEVEL_WARN

static final int LOG_LEVEL_WARN
See Also:
Constant Field Values

LOG_LEVEL_ERROR

static final int LOG_LEVEL_ERROR
See Also:
Constant Field Values
Method Detail

log

void log(int logLevel,
         String module,
         String pkg,
         String cls,
         String method,
         Object[] msgPart,
         Throwable t)
Log a new message.

Parameters:
logLevel - the log level (trace, debug, info, warn, or error)
module - the name of the module that contains the class that intends to generate the log message
pkg - the name of the package that contains the class that intends to generate the log message
cls - the name of the class that intends to generate the log message
method - The name of the method in the above Java class that intends to generate the log message
msgPart - An array of strings and other objects that should be concatenated using String.valueOf(Object) in order to construct the log message
t - An optional Throwable object like an exception that might have caused the log request


Copyright © 2014 universAAL Consortium. All Rights Reserved.