commit d80a5e343ab341bf980849b4347c3474bbb48b84
parent f22d15b4ae57777fb988c00329faa94696f94c97
Author: MS <ms@taler.net>
Date: Wed, 24 Jun 2020 18:38:05 +0200
logging infrastructure
Diffstat:
5 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -61,7 +61,7 @@ import tech.libeufin.nexus.ebics.*
import tech.libeufin.util.*
import tech.libeufin.util.ebics_h004.EbicsTypes
import tech.libeufin.util.ebics_h004.HTDResponseOrderData
-import tech.libeufin.util.logger
+import tech.libeufin.nexus.logger
import java.lang.IllegalArgumentException
import java.net.URLEncoder
import java.util.zip.InflaterInputStream
diff --git a/nexus/src/main/resources/logback.xml b/nexus/src/main/resources/logback.xml
@@ -1,11 +1,15 @@
<!-- configuration scan="true" -->
-<configuration scan="true">
+<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
+ <logger name="tech.libeufin.nexus" level="DEBUG" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
<logger name="tech.libeufin" level="TRACE"/>
<logger name="io.netty" level="WARN"/>
<logger name="ktor" level="WARN"/>
diff --git a/sandbox/src/main/resources/logback.xml b/sandbox/src/main/resources/logback.xml
@@ -7,7 +7,6 @@
<logger name="tech.libeufin.sandbox" level="DEBUG" additivity="false">
<appender-ref ref="STDOUT" />
- <appender-ref ref="SANDBOX-FILE" />
</logger>
<logger name="io.netty" level="WARN" />
diff --git a/util/src/main/kotlin/XMLUtil.kt b/util/src/main/kotlin/XMLUtil.kt
@@ -63,8 +63,7 @@ import javax.xml.xpath.XPath
import javax.xml.xpath.XPathConstants
import javax.xml.xpath.XPathFactory
-val logger: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox")
-
+val logger: Logger = LoggerFactory.getLogger("tech.libeufin.util")
class DefaultNamespaces : NamespacePrefixMapper() {
override fun getPreferredPrefix(namespaceUri: String?, suggestion: String?, requirePrefix: Boolean): String? {
if (namespaceUri == "http://www.w3.org/2000/09/xmldsig#") return "ds"
diff --git a/util/src/test/kotlin/LogTest.kt b/util/src/test/kotlin/LogTest.kt
@@ -1,13 +0,0 @@
-import org.junit.Test
-import org.slf4j.LoggerFactory
-
-
-class LogTest {
- @Test
- fun logLine() {
- val loggerSandbox = LoggerFactory.getLogger("tech.libeufin.sandbox")
- val loggerNexus = LoggerFactory.getLogger("tech.libeufin.nexus")
- loggerSandbox.info("line")
- loggerNexus.trace("other line")
- }
-}