Package org.osgi.service.log

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


                throw new DeploymentException(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(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(DeploymentException.CODE_OTHER_ERROR, "Failed to drop all resources for resource processor '" + rpName + "'!", e);
            }
        }
    }
View Full Code Here

            if (bundle != null) {
                if ("false".equalsIgnoreCase(stopUnaffectedBundle) && 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

                    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

                String symbolicName = bundleInfoImpl.getSymbolicName();

                Bundle bundle = source.getBundle(symbolicName);
                if (bundle != null) {
                    if (isFragmentBundle(bundle)) {
                        log.log(LogService.LOG_INFO, "Skipping fragment bundle '" + symbolicName + "'");
                    } else {
                        try {
                            bundle.start();
                        }
                        catch (Exception be) {
View Full Code Here

                    } else {
                        try {
                            bundle.start();
                        }
                        catch (Exception be) {
                            log.log(LogService.LOG_WARNING, "Could not start bundle '" + symbolicName + "'", be);
                        }
                    }
                } else {
                    log.log(LogService.LOG_WARNING, "Could not start bundle '" + symbolicName + "' because it is not present in the framework");
                }
View Full Code Here

                        catch (Exception be) {
                            log.log(LogService.LOG_WARNING, "Could not start bundle '" + symbolicName + "'", be);
                        }
                    }
                } else {
                    log.log(LogService.LOG_WARNING, "Could not start bundle '" + symbolicName + "' because it is not present in the framework");
                }
            }
        }
    }
View Full Code Here

            if ((logLevel > 0) && (msgLevel <= logLevel))
            {
                LogService log = getLogService();
                if (log != null)
                {
                    log.log(msgLevel, message, throwable);
                }
                else
                {
                    super.log(logLevel, msgLevel, message, throwable);
                }
View Full Code Here

        }

        String message = String.format("%s %s : %s", getLogHeaderForLevel(level), name, msg);
        switch (level) {
            case DEBUG:
                log.log(LogService.LOG_DEBUG, message, exception);
                break;
            case INFO:
                log.log(LogService.LOG_INFO, message, exception);
                break;
            case WARNING:
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.