com.buglabs.osgi.filesystem.util
Class LogServiceUtil

java.lang.Object
  extended by com.buglabs.osgi.filesystem.util.LogServiceUtil

public class LogServiceUtil
extends java.lang.Object

Utility functions relating to OSGi log service.


Constructor Summary
LogServiceUtil()
           
 
Method Summary
static LogService getLogService(BundleContext context)
           
static void logBundleException(LogService logService, java.lang.String message, BundleException exception)
          Log a bundle exception and print nested exception if it exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogServiceUtil

public LogServiceUtil()
Method Detail

getLogService

public static LogService getLogService(BundleContext context)
Parameters:
context - if context is null, it will return a log service that uses stdout.
Returns:
Either the first LogService available in the runtime if available or a SysoutLogService.

logBundleException

public static void logBundleException(LogService logService,
                                      java.lang.String message,
                                      BundleException exception)
Log a bundle exception and print nested exception if it exists.

Parameters:
logService -
message -
exception -