From 7eb08c867077c9a1931638830522816257cb3964 Mon Sep 17 00:00:00 2001 From: Anjum Fatima Date: Tue, 23 May 2017 15:39:32 -0500 Subject: Bug 517152 - [osgi R7] Implement the default default log level launch configuration property Change-Id: I2b20561ee208bee75c3080860b6fc7c8f602b2ea Signed-off-by: Anjum Fatima --- .../eclipse/osgi/internal/log/ConfigAdminListener.java | 13 ++++--------- .../eclipse/osgi/internal/log/EquinoxLogServices.java | 17 +++++++++++++++-- .../internal/log/ExtendedLogReaderServiceFactory.java | 11 +++++++++-- .../osgi/internal/log/ExtendedLogServiceFactory.java | 6 +++--- .../eclipse/osgi/internal/log/LogServiceManager.java | 6 +++--- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ConfigAdminListener.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ConfigAdminListener.java index 3c3fbb2ab..5c96d3abd 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ConfigAdminListener.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ConfigAdminListener.java @@ -39,7 +39,6 @@ class ConfigAdminListener implements ServiceTrackerCustomizer nestedCallCount = new ThreadLocal<>(); private final LinkedList history; private final int maxHistory; + private final LogLevel defaultLevel; static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) { try { @@ -97,7 +98,8 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory 0) { history = new LinkedList<>(); @@ -106,6 +108,10 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory registration) { return new ExtendedLogReaderServiceImpl(this); } @@ -293,4 +299,5 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory(history)); } } + } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java index a33f86c38..e20994355 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2016 Cognos Incorporated, IBM Corporation and others + * Copyright (c) 2006, 2017 Cognos Incorporated, IBM Corporation and others * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -25,7 +25,7 @@ public class ExtendedLogServiceFactory implements ServiceFactory