From 62b0f219dda12922a54f33eb93fddb494e08da7d Mon Sep 17 00:00:00 2001 From: "sergey.tolstyh" Date: Tue, 31 Jan 2023 17:48:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=84=D0=B0=D0=B9=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B3?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=20=D0=B8=20=D0=BF=D0=BE=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D1=81=D1=82=D0=B0=D0=B1=D0=B8=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=83=D1=8E=20=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20gradle-nc?= =?UTF-8?q?ore=20=D0=B2=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8F=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/webapp/WEB-INF/logback.groovy | 28 ------------ src/main/webapp/WEB-INF/logback.xml | 62 ++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 29 deletions(-) delete mode 100644 src/main/webapp/WEB-INF/logback.groovy create mode 100644 src/main/webapp/WEB-INF/logback.xml diff --git a/build.gradle b/build.gradle index 832333e..00fff76 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenLocal() } dependencies { - classpath 'biz.redsoft.gradle.ncore:gradle-ncore:+' + classpath 'biz.redsoft.gradle.ncore:gradle-ncore:1.2.+' classpath 'nu.studer:gradle-credentials-plugin:1.0.4' } } diff --git a/src/main/webapp/WEB-INF/logback.groovy b/src/main/webapp/WEB-INF/logback.groovy deleted file mode 100644 index 2806dd4..0000000 --- a/src/main/webapp/WEB-INF/logback.groovy +++ /dev/null @@ -1,28 +0,0 @@ -import ch.qos.logback.classic.encoder.PatternLayoutEncoder -import com.sun.jna.Platform -import java.nio.charset.Charset - -appender("FILE", FileAppender) { - def catalinaBase = System.properties['catalina.home'] - file = "${catalinaBase}/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"]) -root(DEBUG, ["FILE"]) diff --git a/src/main/webapp/WEB-INF/logback.xml b/src/main/webapp/WEB-INF/logback.xml new file mode 100644 index 0000000..d0c82ff --- /dev/null +++ b/src/main/webapp/WEB-INF/logback.xml @@ -0,0 +1,62 @@ + + + + + + + + ${catalina.home}/logs/ncore.log + true + true + + UTF-8 + %d{dd.MM.yy HH:mm:ss.SSS} [%t] %p %c{0} - %m%n + + + + + + + + \ No newline at end of file