All Downloads are FREE. Search and download functionalities are using the official Maven repository.

etty-runner.4.0.1.source-code.grettyRunnerLogback.groovy Maven / Gradle / Ivy

There is a newer version: 4.1.5
Show newest version
/*
 * Gretty
 *
 * Copyright (C) 2013-2015 Andrey Hihlovskiy and contributors.
 *
 * See the file "LICENSE" for copying and usage permission.
 * See the file "CONTRIBUTORS" for complete list of contributors.
 */
scan '30 seconds'

def appenders = []

def logDir_ = logDir
def logFileName_ = logFileName

if(consoleLogEnabled) {
  appenders.add('CONSOLE')
  appender('CONSOLE', ConsoleAppender) {
    encoder(PatternLayoutEncoder) {
      pattern = '%-8date{HH:mm:ss} %-5level %msg%n'
    }
  }
}

if(fileLogEnabled) {
  appenders.add('FILE')
  appender('FILE', RollingFileAppender) {
    file = "${logDir_}/${logFileName_}.log"
    append = true
    rollingPolicy(TimeBasedRollingPolicy) {
      fileNamePattern = "${logDir_}/${logFileName_}-%d{yyyy-MM-dd_HH}.log"
      maxHistory = 7
    }
    encoder(PatternLayoutEncoder) {
      pattern = '%-8date{HH:mm:ss} %-5level %logger{35} - %msg%n'
    }
  }
}

root loggingLevel, appenders

logger 'org.apache.catalina', WARN

logger 'org.apache.coyote', WARN

logger 'org.apache.jasper', WARN

logger 'org.apache.tomcat', WARN

logger 'org.eclipse.jetty', WARN

logger 'org.eclipse.jetty.annotations.AnnotationConfiguration', ERROR

logger 'org.eclipse.jetty.annotations.AnnotationParser', ERROR

logger 'org.eclipse.jetty.util.component.AbstractLifeCycle', ERROR

logger 'org.akhikhl.gretty', grettyDebug ? DEBUG : INFO




© 2015 - 2024 Weber Informatics LLC | Privacy Policy