Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62a88fd045 | |||
| 548386407f |
+4
-1
@@ -7,4 +7,7 @@ nbactions.xml
|
|||||||
*.log
|
*.log
|
||||||
docker.sock
|
docker.sock
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.settings/
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import static ch.qos.logback.classic.Level.DEBUG
|
||||||
|
import static ch.qos.logback.classic.Level.INFO
|
||||||
|
import static ch.qos.logback.classic.Level.ALL
|
||||||
|
|
||||||
|
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
||||||
|
import ch.qos.logback.core.rolling.RollingFileAppender
|
||||||
|
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy
|
||||||
|
|
||||||
|
import java.nio.charset.Charset
|
||||||
|
|
||||||
|
def patternString = '%d{YYYY-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg %ex{20}%n'
|
||||||
|
def userHome = System.getProperty("user.home")
|
||||||
|
|
||||||
|
appender("applicationLogFile", RollingFileAppender) {
|
||||||
|
rollingPolicy(TimeBasedRollingPolicy) {
|
||||||
|
fileNamePattern = "$userHome/.unicenta/unicenta-%d{yyyy-MM-dd}.log"
|
||||||
|
maxHistory = "5"
|
||||||
|
}
|
||||||
|
encoder(PatternLayoutEncoder) {
|
||||||
|
charset = Charset.forName("UTF-8")
|
||||||
|
pattern = patternString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appender('console', ConsoleAppender) {
|
||||||
|
encoder(PatternLayoutEncoder) {
|
||||||
|
pattern = patternString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logger('com.unicenta', DEBUG)
|
||||||
|
|
||||||
|
root(DEBUG, ['console', 'applicationLogFile'])
|
||||||
Reference in New Issue
Block a user