Grails 2.x update gotcha – your logging has changed

When updating your application to grails 2.x from the 1.3.x branches, you might notice that your logging no longer works.

This is due to changes in the logging by convention. While this is mentioned in the user guide (under Logging By Convention Changes), it is not very clear what this means.

In our update, we found that we needed to change our Log4J configuration from:

 info 'grails.app.controller',
      'grails.app.task',
      'grails.app.service',
      'grails.app.tagLib',
      'grails.app.bootstrap.BootStrap'

to:

info 'grails.app.controllers',
     'grails.app.jobs',
     'grails.app.services',
     'grails.app.taglib',
     'grails.app.conf.BootStrap'

While this might look trivial, it’s a fairly important breaking change.

Additionally, if you have Quartz jobs in your application, the logging convention changes from task to jobs. This is not mentioned in the grails documentation.

Happy upgrading.

3 thoughts on “Grails 2.x update gotcha – your logging has changed

  1. Pingback: An Army of Solipsists » Blog Archive » This Week in Grails (2013-01)

  2. Pingback: Questa settimana in Grails (2013-01) - luca-canducci.com - Il blog di Luca Canducci: notizie, tips e nuove tecnologie dal mondo dell’IT.

  3. Pingback: This Week in Grails (2013-01) | Nevada Java User Group

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s