Hi all,

first, let me thank you all for Karaf project. I've just started using it and I really like it.

I would like to ask how can I be notified/log/see uncaught exceptions that originate from my bundle. For example, following code results in info message and runtime exception, which I see only as "Activator start error in bundle...".

    @Override
    public void start(BundleContext context) throws Exception {
LoggerFactory.getLogger(NetworkModuleActivator.class).info("Network bundle started!"); System.out.println(UnicornApplication.get().getDomainWidgetService().getClass().getName());
    }

To know what happened i wrapped it like this:

        try {
System.out.println(UnicornApplication.get().getDomainWidgetService().getClass().getName());
        } catch (Exception e) {
LoggerFactory.getLogger(NetworkModuleActivator.class).error("", e);
        }

Is there any way to log uncaught exception from bundles? I don't know if all the code I use won't let one slip through.

Thanks in advance,

Regards,

Marek

Reply via email to