简体   繁体   中英

Configuring Logging for Grails Standalone App Runner

I am writing a Grails app and would like to use the Grails Standalone App Runner that packages your Grails app into a fat JAR with an embedded Tomcat container.

I would like to configure logging for the embedded Tomcat container will use to store and read SSL certs from. I want to specify log levels for different catalina components, and also replace log4j with logback using SyslogAppender .

How/where do I make such configurations? Is this documented anywhere?

If you want to replace log4j with logback, you can use Logback Plugin .

You need to add following lines in your BuildConfig.groovy.

dependencies {
   compile 'org.grails.plugins:logback:0.3.1'
}

You also need to exclude grails log4j plugin.

inherits('global') {
   excludes 'grails-plugin-log4j', 'log4j'
}

You also need to run

grails clean

to remove compiled files.

You can find more about the plugin here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM