org.apache.aries.jmx
Class Logger

java.lang.Object
  extended by org.osgi.util.tracker.ServiceTracker
      extended by org.apache.aries.jmx.Logger
All Implemented Interfaces:
org.osgi.service.log.LogService, org.osgi.util.tracker.ServiceTrackerCustomizer

public class Logger
extends org.osgi.util.tracker.ServiceTracker
implements org.osgi.service.log.LogService

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

Version:
$Rev: 920877 $ $Date: 2010-03-09 13:58:54 +0000 (Tue, 09 Mar 2010) $
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(org.osgi.framework.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(org.osgi.framework.ServiceReference ref, int level, String message)
           
 void log(org.osgi.framework.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(org.osgi.framework.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 org.osgi.service.log.LogService
See Also:
LogService.log(int, java.lang.String)

log

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

log

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

log

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


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