Amendments due to migration to logback
This commit is contained in:
27
logback.groovy
Normal file
27
logback.groovy
Normal file
@ -0,0 +1,27 @@
|
||||
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
||||
import com.sun.jna.Platform
|
||||
|
||||
import java.nio.charset.Charset
|
||||
|
||||
appender("FILE", FileAppender) {
|
||||
file = "logs/ncore.log"
|
||||
append = true
|
||||
immediateFlush = true
|
||||
encoder(PatternLayoutEncoder) {
|
||||
pattern = "%d{dd.MM.yy HH:mm:ss.SSS} [%t] %p %c{0} - %m%n"
|
||||
}
|
||||
}
|
||||
|
||||
appender("STDOUT", ConsoleAppender) {
|
||||
encoder(PatternLayoutEncoder) {
|
||||
def predefined = System.getProperty("log.console.encoding")
|
||||
if (predefined)
|
||||
charset = Charset.forName(predefined)
|
||||
else
|
||||
charset = Charset.forName(Platform.isWindows() ? "Cp866" : "UTF-8")
|
||||
pattern = "%d{dd.MM.yy HH:mm:ss.SSS} [%t] %p %c{0} - %m%n"
|
||||
outputPatternAsHeader = true
|
||||
}
|
||||
}
|
||||
|
||||
root(DEBUG, ["FILE", "STDOUT"])
|
Reference in New Issue
Block a user