BundleLoggingProvider implements LoggingProvider { @Override public void log(final int depth, final String tag, final Level level, final Throwable exception, final MessageFormatter formatter, final Object obj, final Object... arguments) { for (int i = 0; i < loggingProviders.length; ++i) { loggingProviders[i].log(depth + 1, tag, level, exception, formatter, obj, arguments); } } BundleLoggingProvider(final Collection<LoggingProvider> providers); @Override ContextProvider getContextProvider(); @Override Level getMinimumLevel(); @Override Level getMinimumLevel(final String tag); @Override boolean isEnabled(final int depth, final String tag, final Level level); @Override void log(final int depth, final String tag, final Level level, final Throwable exception, final MessageFormatter formatter,
		final Object obj, final Object... arguments); @Override void log(final String loggerClassName, final String tag, final Level level, final Throwable exception,
		final MessageFormatter formatter, final Object obj, final Object... arguments); @Override void shutdown();  }
@Test public void logWithDepthIndex() { init(Level.TRACE, Level.TRACE); NullPointerException exception = new NullPointerException(); MessageFormatter formatter = mock(MessageFormatter.class); bundle.log(1, "technical", Level.INFO, exception, formatter, "Test", 42); verify(first).log(2, "technical", Level.INFO, exception, formatter, "Test", 42); verify(second).log(2, "technical", Level.INFO, exception, formatter, "Test", 42); }
@Test public void logWithLoggerClass() { init(Level.TRACE, Level.TRACE); NullPointerException exception = new NullPointerException(); MessageFormatter formatter = mock(MessageFormatter.class); bundle.log(BundleContextProvider.class.getName(), "technical", Level.INFO, exception, formatter, "Test", 42); verify(first).log(BundleContextProvider.class.getName(), "technical", Level.INFO, exception, formatter, "Test", 42); verify(second).log(BundleContextProvider.class.getName(), "technical", Level.INFO, exception, formatter, "Test", 42); }