Package org.osgi.service.log

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


                        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();
                        }
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

                            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

                    bundle.uninstall();
                    addRollback(new InstallBundleRunnable(bundle, target, log));
                }
            }
            catch (Exception be) {
                log.log(LogService.LOG_WARNING, "Bundle '" + symbolicName + "' could not be uninstalled", be);
            }
        }
    }

    private static class InstallBundleRunnable extends AbstractAction {
View Full Code Here

                    Bundle bundle = target.getBundle(symbolicName);
                    bundle.uninstall();
                    addRollback(new InstallBundleRunnable(bundle, target, log));
                }
                catch (Exception be) {
                    log.log(LogService.LOG_WARNING, "Bundle '" + symbolicName + "' could not be uninstalled", be);
                }
            }
        }
    }
View Full Code Here

    }

    public void log(ServiceReference sr, int level, String message, Throwable exception) {
        LogService log = (LogService) getService();
        if(log != null)
            log.log(sr, level, message, exception);
    }
}
View Full Code Here

            if (reference != null)
            {
                final LogService logService = (LogService) m_context.getService(reference);
                if (logService != null)
                {
                    logService.log(level, message, exception);
                    m_context.ungetService(reference);
                    return true;
                }
            }
        }
View Full Code Here

        }
    }

    protected void log(int level, String msg) {
      final LogService log = getService(LogService.class);
      log.log(level, msg);
    }

    protected Option[] defaultConfiguration() {
      String vmOpt = "-Dosgi.installer.testing";
View Full Code Here

        if (log == null) {
            throw new RuntimeException("No Log Service !");
        }

        LogService logs = (LogService) osgiHelper.getServiceObject(LogService.class.getName(), null);
        logs.log(LogService.LOG_WARNING, "Ready");
    }

    @Configuration
    public Option[] config() throws IOException {
        Option[] options = super.config();
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.