Package org.osgi.service.log

Examples of org.osgi.service.log.LogService.log()


  private void log (int level, String message){
    ServiceReference lsn=bc.getServiceReference(LogService.class.getName());
    if (lsn!=null){
      LogService ls=(LogService)bc.getService(lsn);
      ls.log(level, message);
    }else{
      System.out.println("ERROR : Logger.start : No service "+LogService.class.getName()+" is present");
    }
  }
View Full Code Here


   
    @Override
    public void log(int level, String message) {
        LogService logService = getLogService();
        if (logService != null) {
            logService.log(level, message);
        }
    }

    @Override
    public void log(int level, String message, Throwable exception) {
View Full Code Here

    @Override
    public void log(int level, String message, Throwable exception) {
        LogService logService = getLogService();
        if (logService != null) {
            logService.log(level, message, exception);
        }
    }

    @Override
    public void log(ServiceReference sr, int level, String message) {
View Full Code Here

    @Override
    public void log(ServiceReference sr, int level, String message) {
        LogService logService = getLogService();
        if (logService != null) {
            logService.log(sr, level, message);
        }
    }

    @Override
    public void log(ServiceReference sr, int level, String message, Throwable exception) {
View Full Code Here

    @Override
    public void log(ServiceReference sr, int level, String message, Throwable exception) {
        LogService logService = getLogService();
        if (logService != null) {
            logService.log(sr, level, message, exception);
        }
    }
   
    /**
     * @return a {@link LogService} instance, or <code>null</code> if not available.
View Full Code Here

            // Keep track of which resource processors we've seen already...
            resourceProcessors.add(rpName);

            ServiceReference ref = target.getResourceProcessor(path);
            if (ref == null) {
                log.log(LogService.LOG_ERROR, "Failed to find resource processor for '" + rpName + "'!");
                throw new DeploymentException(CODE_PROCESSOR_NOT_FOUND, "Failed to find resource processor '" + rpName + "'!");
            }

            ResourceProcessor resourceProcessor = (ResourceProcessor) context.getService(ref);
            if (resourceProcessor == null) {
View Full Code Here

                throw new DeploymentException(CODE_PROCESSOR_NOT_FOUND, "Failed to find resource processor '" + rpName + "'!");
            }

            ResourceProcessor resourceProcessor = (ResourceProcessor) context.getService(ref);
            if (resourceProcessor == null) {
                log.log(LogService.LOG_ERROR, "Failed to find resource processor for '" + rpName + "'!");
                throw new DeploymentException(CODE_PROCESSOR_NOT_FOUND, "Failed to find resource processor '" + rpName + "'!");
            }

            try {
                if (m_commitCommand.addResourceProcessor(resourceProcessor)) {
View Full Code Here

                    resourceProcessor.begin(session);
                }
                resourceProcessor.dropAllResources();
            }
            catch (Exception e) {
                log.log(LogService.LOG_ERROR, "Failed to drop all resources for resource processor '" + rpName + "'!", e);
                throw new DeploymentException(CODE_OTHER_ERROR, "Failed to drop all resources for resource processor '" + rpName + "'!", e);
            }
        }
    }
View Full Code Here

            if (bundle != null) {
                if (omitBundleStop(session, symbolicName)) {
                    continue;
                }
                if (isFragmentBundle(bundle)) {
                    log.log(LogService.LOG_INFO, "Skipping fragment bundle '" + symbolicName + "'");
                }
                else {
                    addRollback(new StartBundleRunnable(session, bundle));
                    try {
                        bundle.stop();
View Full Code Here

                    addRollback(new StartBundleRunnable(session, bundle));
                    try {
                        bundle.stop();
                    }
                    catch (Exception e) {
                        log.log(LogService.LOG_WARNING, "Could not stop bundle '" + symbolicName + "'", e);
                    }
                }
            }
            else {
                log.log(LogService.LOG_WARNING, "Could not stop bundle '" + symbolicName + "' because it was not present in the framework");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.