Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs

Thursday, July 21, 2011

linux - grails app will not deploy on tomcat FAIL - Application could not be started - Stack Overflow

linux - grails app will not deploy on tomcat FAIL - Application could not be started - Stack Overflow

use the following snippet in grails-app/Config.groovy:

def catalinaBase = System.properties.getProperty('catalina.base')
if (!catalinaBase) catalinaBase = '.' // just in case
def logDirectory = "${catalinaBase}/logs"

log4j
= { root ->
appenders
{
rollingFile name
:'stdout', file:"${logDirectory}/${appName}.log".toString(), maxFileSize:'100MB'
rollingFile name
:'stacktrace', file:"${logDirectory}/${appName}_stack.log".toString(), maxFileSize:'100MB'
}

error
'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate'
root
.level = org.apache.log4j.Level.WARN
}

No comments:

Post a Comment