From 4648093066e69a8a33a8a1bfd53f19a43631248a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Galland?= Date: Tue, 24 Mar 2020 23:36:11 +0100 Subject: [PATCH] [sre] Move all the JUL implementation into a dedicated package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see #984 Signed-off-by: Stéphane Galland --- .../sarl/sre/boot/internal/services/LoggerCreatorModule.sarl | 2 +- .../sarl/sre/boot/internal/services/LoggingServiceModule.sarl | 4 ++-- .../sarl/sre/services/logging/{ => jul}/JulLoggerCreator.sarl | 2 +- .../sre/services/logging/{ => jul}/JulLoggingService.sarl | 3 ++- .../sre/services/logging/{ => jul}/JulPatternFormatter.sarl | 2 +- .../io/sarl/sre/services/logging/{ => jul}/JulStreams.sarl | 2 +- .../sre/tests/units/services/AbstractServiceManagerTest.sarl | 2 +- .../sre/tests/units/services/GoogleServiceManagerTest.sarl | 2 +- .../services/logging/{ => jul}/JulLoggerCreatorTest.sarl | 4 ++-- 9 files changed, 12 insertions(+), 11 deletions(-) rename sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/{ => jul}/JulLoggerCreator.sarl (99%) rename sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/{ => jul}/JulLoggingService.sarl (97%) rename sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/{ => jul}/JulPatternFormatter.sarl (98%) rename sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/{ => jul}/JulStreams.sarl (98%) rename sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/{ => jul}/JulLoggerCreatorTest.sarl (96%) diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggerCreatorModule.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggerCreatorModule.sarl index 885b6bbff3..77e1d7f84d 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggerCreatorModule.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggerCreatorModule.sarl @@ -27,7 +27,7 @@ import com.google.inject.Provides import io.bootique.BQModule import io.bootique.BQModuleProvider import io.sarl.sre.boot.configs.SreConfig -import io.sarl.sre.services.logging.JulLoggerCreator +import io.sarl.sre.services.logging.jul.JulLoggerCreator import java.util.logging.Logger import javax.inject.Provider import javax.inject.Singleton diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggingServiceModule.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggingServiceModule.sarl index 9088360848..a0a23d8c61 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggingServiceModule.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/boot/internal/services/LoggingServiceModule.sarl @@ -27,7 +27,7 @@ import com.google.inject.Module import com.google.inject.Provides import io.bootique.BQModule import io.bootique.BQModuleProvider -import io.sarl.sre.services.logging.JulLoggingService +import io.sarl.sre.services.logging.jul.JulLoggingService import io.sarl.sre.services.logging.LoggingService import io.sarl.sre.services.logging.QuietLoggingService import org.arakhne.afc.bootique.log4j.configs.Level @@ -35,7 +35,7 @@ import org.arakhne.afc.bootique.log4j.configs.Log4jIntegrationConfig import static extension com.google.inject.multibindings.Multibinder.* import javax.inject.Singleton -import io.sarl.sre.services.logging.JulLoggerCreator +import io.sarl.sre.services.logging.jul.JulLoggerCreator import javax.inject.Provider /** diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggerCreator.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggerCreator.sarl similarity index 99% rename from sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggerCreator.sarl rename to sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggerCreator.sarl index ff1cd4aec9..b3df59a83b 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggerCreator.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggerCreator.sarl @@ -18,7 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.sarl.sre.services.logging +package io.sarl.sre.services.logging.jul import io.sarl.sre.boot.configs.SreConfig import io.sarl.sre.boot.configs.subconfigs.LoggingConfig diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggingService.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggingService.sarl similarity index 97% rename from sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggingService.sarl rename to sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggingService.sarl index 15025591b4..cd05263e17 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulLoggingService.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulLoggingService.sarl @@ -18,13 +18,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.sarl.sre.services.logging +package io.sarl.sre.services.logging.jul import io.sarl.sre.services.AbstractSreService import java.util.logging.Level import java.util.logging.Logger import javax.inject.Inject import javax.inject.Singleton +import io.sarl.sre.services.logging.LoggingService /** * This class enables to log information by ensuring that the values of the parameters are not evaluated until the information diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulPatternFormatter.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulPatternFormatter.sarl similarity index 98% rename from sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulPatternFormatter.sarl rename to sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulPatternFormatter.sarl index 80833858c3..937f5415c3 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulPatternFormatter.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulPatternFormatter.sarl @@ -18,7 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.sarl.sre.services.logging +package io.sarl.sre.services.logging.jul import java.io.PrintWriter import java.io.StringWriter diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulStreams.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulStreams.sarl similarity index 98% rename from sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulStreams.sarl rename to sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulStreams.sarl index 8457af5df9..15ea7db4bc 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/JulStreams.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/services/logging/jul/JulStreams.sarl @@ -18,7 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.sarl.sre.services.logging +package io.sarl.sre.services.logging.jul import java.io.PrintStream import java.util.logging.Formatter diff --git a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/AbstractServiceManagerTest.sarl b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/AbstractServiceManagerTest.sarl index c731c53e39..4b9c3f7dcd 100644 --- a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/AbstractServiceManagerTest.sarl +++ b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/AbstractServiceManagerTest.sarl @@ -25,7 +25,7 @@ import com.google.common.util.concurrent.Service import io.sarl.sre.boot.configs.SreConfig import io.sarl.sre.boot.configs.subconfigs.ServicesConfig import io.sarl.sre.services.AbstractServiceManager -import io.sarl.sre.services.logging.JulLoggerCreator +import io.sarl.sre.services.logging.jul.JulLoggerCreator import io.sarl.sre.test.framework.^extension.PropertyRestoreExtension import io.sarl.sre.tests.units.services.mocks.SreServ1 import io.sarl.sre.tests.units.services.mocks.SreServ1Impl diff --git a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/GoogleServiceManagerTest.sarl b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/GoogleServiceManagerTest.sarl index 6b1083fdb6..1d6bde29c0 100644 --- a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/GoogleServiceManagerTest.sarl +++ b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/GoogleServiceManagerTest.sarl @@ -24,7 +24,7 @@ package io.sarl.sre.tests.units.services import com.google.common.util.concurrent.Service import io.sarl.sre.boot.configs.SreConfig import io.sarl.sre.services.GoogleServiceManager -import io.sarl.sre.services.logging.JulLoggerCreator +import io.sarl.sre.services.logging.jul.JulLoggerCreator import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Tag diff --git a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/JulLoggerCreatorTest.sarl b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/jul/JulLoggerCreatorTest.sarl similarity index 96% rename from sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/JulLoggerCreatorTest.sarl rename to sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/jul/JulLoggerCreatorTest.sarl index a8fea7390c..a20ff4b4ea 100644 --- a/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/JulLoggerCreatorTest.sarl +++ b/sre/io.janusproject/io.janusproject.tests/src/test/sarl/io/sarl/sre/tests/units/services/logging/jul/JulLoggerCreatorTest.sarl @@ -19,12 +19,12 @@ * limitations under the License. */ -package io.sarl.sre.tests.units.services.logging +package io.sarl.sre.tests.units.services.logging.jul import io.sarl.sre.boot.configs.SreConfig import io.sarl.sre.boot.configs.subconfigs.LoggingConfig import io.sarl.sre.boot.configs.subconfigs.ServicesConfig -import io.sarl.sre.services.logging.JulLoggerCreator +import io.sarl.sre.services.logging.jul.JulLoggerCreator import io.sarl.sre.test.framework.^extension.PropertyRestoreExtension import io.sarl.tests.api.Nullable import io.sarl.tests.api.extensions.ContextInitExtension