Spring Security ACL Plugin
  1. Spring Security ACL Plugin
  2. GPSPRINGSECURITYACL-20

AclService artifact should use injected logger instance

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Grails-Spring-Security-ACL 1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Grails 2.0.0

      Description

      The org.grails.plugins.springsecurity.service.acl.AclService class declares the logger instance explicitly and as private:

      private final Logger log = Logger.getLogger(getClass())
      

      Is there a particular reason not to use the injected log instance, since it is a Grails service?

      This service breaks the usage of the runtime-logging 0.4 plugin because it can't access the log instance from outside. Arguably this should be handled judiciously in the runtime-logging plugin, but I think my issue may be valid despite the incompatibility with the runtime-logging plugin .

      Moreover, there is no Jira space for the runtime-logging plugin and it is questionable if it is still actively maintained . The error that occurs with this plugin is:

      | Error 2012-02-07 10:23:11,340 ["http-bio-8080"-exec-7] ERROR errors.GrailsExceptionResolver  - MissingPropertyException occurred when processing request: [GET] /etrace/runtimeLogging
      No such property: log for class: org.grails.plugins.springsecurity.service.acl.AclService. Stacktrace follows:
      Message: No such property: log for class: org.grails.plugins.springsecurity.service.acl.AclService
         Line | Method
      ->> 121 | buildArtefactLoggerMapList in grails.plugin.runtimelogging.RuntimeLoggingController
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      |    51 | doCall                     in grails.plugin.runtimelogging.RuntimeLoggingController$_closure1
      |   886 | runTask . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
      |   908 | run                        in     ''
      ^   662 | run . . . . . . . . . . .  in java.lang.Thread 
      

      Commenting out the private logger declaration solves this issue and the runtime-logging plugin works as expected again.

      1. AclService.groovy.diff
        1 kB
        Igor E. Poteryaev
      2. SpringSecurityAclGrailsPlugin.groovy.diff
        0.5 kB
        Igor E. Poteryaev

        Activity

        Hide
        Igor E. Poteryaev added a comment -

        Patch for log4j -> slf4j replacement is attached

        Show
        Igor E. Poteryaev added a comment - Patch for log4j -> slf4j replacement is attached

          People

          • Assignee:
            Burt Beckwith
            Reporter:
            Benjamin Wolff
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: