Skip to content

Commit

Permalink
attempted fix for GRAILSPLUGINS-1546
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Nov 6, 2009
1 parent a113f82 commit b134adb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion grails/src/grails/grails-app/conf/Config.groovy
Expand Up @@ -37,7 +37,8 @@ grails.scaffolding.templates.domainSuffix = 'Instance'
grails.json.legacy.builder=false
// enabled native2ascii conversion of i18n properties files
grails.enable.native2ascii = true

// whether to install the java.util.logging bridge for sl4j. Disable fo AppEngine!
grails.logging.jul.usebridge = true

// set per-environment serverURL stem for creating absolute links
environments {
Expand Down
Expand Up @@ -36,9 +36,12 @@ class LoggingGrailsPlugin {
def observe = ['*']

def doWithSpring = {
def juLogMgr = java.util.logging.LogManager.logManager
juLogMgr.readConfiguration(new ByteArrayInputStream(".level=INFO".bytes))
org.slf4j.bridge.SLF4JBridgeHandler.install()
def usebridge = application.config?.grails?.logging?.jul?.usebridge
if(usebridge) {
def juLogMgr = application.classLoader.loadClass("java.util.logging.LogManager").logManager
juLogMgr.readConfiguration(new ByteArrayInputStream(".level=INFO".bytes))
org.slf4j.bridge.SLF4JBridgeHandler.install()
}
}

def doWithDynamicMethods = {applicationContext ->
Expand Down

0 comments on commit b134adb

Please sign in to comment.