Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/FormatterLoggerImpl.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/FormatterLoggerImpl.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/FormatterLoggerImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/FormatterLoggerImpl.java
new file mode 100644
index 000000000..d3ab1e478
--- /dev/null
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/FormatterLoggerImpl.java
@@ -0,0 +1,17 @@
+package org.eclipse.osgi.internal.log;
+
+import org.osgi.service.log.FormatterLogger;
+import org.osgi.service.log.LogLevel;
+
+public class FormatterLoggerImpl extends LoggerImpl implements FormatterLogger {
+ public FormatterLoggerImpl(ExtendedLogServiceImpl logServiceImpl, String name) {
+ super(logServiceImpl, name);
+ }
+
+ @Override
+ protected void log(LogLevel level, String format, Object... arguments) {
+ Arguments processedArguments = new Arguments(arguments);
+ String message = String.format(format, processedArguments.arguments());
+ logServiceImpl.log(name, processedArguments.serviceReference(), level.ordinal(), message, processedArguments.throwable());
+ }
+}

Back to the top