Grails

Console appender does not work as expected

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta2
  • Fix Version/s: 1.1-beta3
  • Component/s: Configuration
  • Labels:
    None
  • Environment:
    Mac OS X, Linux

Description

According to the documentation one should be able to define a consoleAppender like so:

log4j = {
appenders {
      console name:'consoleAppender', layout:pattern(conversionPattern: '%d{ISO8601} %-5p [%c{2}] %m%n')
}
debug  consoleAppender:'grails.app'
}

However doing this results in the following error:

log4j:ERROR No output stream or file set for the appender named
[consoleAppender].

Graeme suggested a work-around:

appenders {
  def appender = console( name:'consoleAppender',
           layout:pattern(conversionPattern: '%d{ISO8601} %-5p [%c{2}] %m%n'))
   appender.activateOptions()
}

and while that does indeed remove the error the conversionPattern is not honored (possibly a separate bug)

Activity

Hide
Sergey Nebolsin added a comment -

Fixed in rev. 8048.

Show
Sergey Nebolsin added a comment - Fixed in rev. 8048.
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: