Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of 'grails.logging.jul.usebridge' in grails config.groovy

I am a newbie for log4j and sl4j, I am using grails 2.0.4 and in config.groovy there is a line

grails.logging.jul.usebridge = false for prod

&

grails.logging.jul.usebridge = true for dev

I followed this article, As it says that use of grails.logging.jul.usebridge is to implement the swapping logic of logging frameworks such as

  • log4j
  • java.util.logging
  • commons logging
  • logback

Is this the only use of grails.logging.jul.usebridge in config.groovy, or is there any other uses And one more question

1) which is the recommended logging framework to use in production environment

like image 295
n92 Avatar asked Aug 29 '12 06:08

n92


1 Answers

I definitely recommend you using Log4j. It has no dependencies and is tested (or even included) in various web app servers. You can configure it easily via DSL in Config.groovy or in separate config file in production environment.

Both commons-logging and SLF4J are wrappers for Log4j and use it underneath.

The grails.logging.jul.usebridge = true is used to put java.util.logging through SLF4J, as described here.

like image 165
Piotr Jagielski Avatar answered Nov 08 '22 13:11

Piotr Jagielski