org.apache.felix.useradmin.impl
Class Logger

java.lang.Object
  extended by org.osgi.util.tracker.ServiceTracker
      extended by org.apache.felix.useradmin.impl.Logger
All Implemented Interfaces:
LogService, ServiceTrackerCustomizer

public class Logger
extends ServiceTracker
implements LogService

This Logger class represents ServiceTracker for LogService. It provides methods for logging messages. If LogServic is not available it logs to stdout.

Version:
$Rev$ $Date$
See Also:
LogService, ServiceTracker

Field Summary
 
Fields inherited from class org.osgi.util.tracker.ServiceTracker
context, filter
 
Fields inherited from interface org.osgi.service.log.LogService
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
 
Constructor Summary
Logger(BundleContext context)
          Constructs new Logger(ServiceTracker for LogService).
 
Method Summary
 void log(int level, String message)
           
 void log(int level, String message, Throwable exception)
           
 void log(ServiceReference ref, int level, String message)
           
 void log(ServiceReference ref, int level, String message, Throwable exception)
           
 
Methods inherited from class org.osgi.util.tracker.ServiceTracker
addingService, close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, modifiedService, open, open, remove, removedService, size, waitForService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger(BundleContext context)
Constructs new Logger(ServiceTracker for LogService).

Parameters:
context - bundle context.
Method Detail

log

public void log(int level,
                String message)
Specified by:
log in interface LogService
See Also:
LogService.log(int, java.lang.String)

log

public void log(int level,
                String message,
                Throwable exception)
Specified by:
log in interface LogService
See Also:
LogService.log(int, java.lang.String, java.lang.Throwable)

log

public void log(ServiceReference ref,
                int level,
                String message)
Specified by:
log in interface LogService
See Also:
LogService.log(org.osgi.framework.ServiceReference, int, java.lang.String)

log

public void log(ServiceReference ref,
                int level,
                String message,
                Throwable exception)
Specified by:
log in interface LogService
See Also:
LogService.log(org.osgi.framework.ServiceReference, int, java.lang.String, java.lang.Throwable)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.