org.apache.felix.http.base.internal.logger
Class AbstractLogger

java.lang.Object
  extended by org.apache.felix.http.base.internal.logger.AbstractLogger
All Implemented Interfaces:
LogService
Direct Known Subclasses:
ConsoleLogger, LogServiceLogger, NopLogger

public abstract class AbstractLogger
extends Object
implements LogService


Field Summary
 
Fields inherited from interface org.osgi.service.log.LogService
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
 
Constructor Summary
AbstractLogger()
           
 
Method Summary
 void log(int level, String message)
          Logs a message.
 void log(int level, String message, Throwable cause)
          Logs a message with an exception.
 void log(ServiceReference ref, int level, String message)
          Logs a message associated with a specific ServiceReference object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osgi.service.log.LogService
log
 

Constructor Detail

AbstractLogger

public AbstractLogger()
Method Detail

log

public final void log(int level,
                      String message)
Description copied from interface: LogService
Logs a message.

The ServiceReference field and the Throwable field of the LogEntry object will be set to null.

Specified by:
log in interface LogService
Parameters:
level - The severity of the message. This should be one of the defined log levels but may be any integer that is interpreted in a user defined way.
message - Human readable string describing the condition or null.
See Also:
LogService.LOG_ERROR, LogService.LOG_WARNING, LogService.LOG_INFO, LogService.LOG_DEBUG

log

public final void log(int level,
                      String message,
                      Throwable cause)
Description copied from interface: LogService
Logs a message with an exception.

The ServiceReference field of the LogEntry object will be set to null.

Specified by:
log in interface LogService
Parameters:
level - The severity of the message. This should be one of the defined log levels but may be any integer that is interpreted in a user defined way.
message - The human readable string describing the condition or null.
cause - The exception that reflects the condition or null.
See Also:
LogService.LOG_ERROR, LogService.LOG_WARNING, LogService.LOG_INFO, LogService.LOG_DEBUG

log

public final void log(ServiceReference ref,
                      int level,
                      String message)
Description copied from interface: LogService
Logs a message associated with a specific ServiceReference object.

The Throwable field of the LogEntry will be set to null.

Specified by:
log in interface LogService
Parameters:
ref - The ServiceReference object of the service that this message is associated with or null.
level - The severity of the message. This should be one of the defined log levels but may be any integer that is interpreted in a user defined way.
message - Human readable string describing the condition or null.
See Also:
LogService.LOG_ERROR, LogService.LOG_WARNING, LogService.LOG_INFO, LogService.LOG_DEBUG


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.