[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libeufin] branch master updated: fix file appender (logger
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libeufin] branch master updated: fix file appender (logger) |
Date: |
Mon, 23 Sep 2019 23:38:46 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new d958b16 fix file appender (logger)
d958b16 is described below
commit d958b1659698b0b4ecd53ac84c4991daf829ff86
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Sep 23 23:38:39 2019 +0200
fix file appender (logger)
---
src/main/kotlin/Main.kt | 1 -
src/main/kotlin/tech/libeufin/GetLogger.kt | 12 +++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt
index befbf5a..068e990 100644
--- a/src/main/kotlin/Main.kt
+++ b/src/main/kotlin/Main.kt
@@ -29,7 +29,6 @@ import io.ktor.server.netty.*
import tech.libeufin.messages.HEVResponse
import tech.libeufin.messages.HEVResponseDataType
import tech.libeufin.messages.ProtocolAndVersion
-import javax.swing.text.Document
import javax.xml.bind.JAXBElement
fun main(args: Array<String>) {
diff --git a/src/main/kotlin/tech/libeufin/GetLogger.kt
b/src/main/kotlin/tech/libeufin/GetLogger.kt
index 2f076b2..bfc35ce 100644
--- a/src/main/kotlin/tech/libeufin/GetLogger.kt
+++ b/src/main/kotlin/tech/libeufin/GetLogger.kt
@@ -8,12 +8,14 @@ import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
fun getLogger(): Logger {
- val fa = FileAppender<ILoggingEvent>()
- val lc = LoggerFactory.getILoggerFactory()
- fa.setContext(lc as LoggerContext)
- fa.setFile("server.log");
+ val lc = LoggerFactory.getILoggerFactory() as LoggerContext
val logger: Logger = LoggerFactory.getLogger("libeufin-sandbox") as Logger
+ val fa = FileAppender<ILoggingEvent>()
+
+ fa.context = lc
+ fa.file = "server.log"
+ fa.start()
logger.addAppender(fa);
- logger.setLevel(Level.DEBUG);
+ logger.level = Level.DEBUG
return logger;
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libeufin] branch master updated: fix file appender (logger),
gnunet <=