Grails
  1. Grails
  2. GRAILS-4376

log4j-configuration: 2 instances of stacktrace.log created

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1.1, 1.2-M1
    • Component/s: Configuration
    • Labels:
      None
    • Environment:
      SLES9
      JDK-1.5.0_16
      Grails 1.1.0
      JBoss-4.2.2


      Description

      the log-config below create 2 files 'stacktrace.log'
      one in the appservers workingdir: $JBOSS_HOME/bin/stacktrace.log
      and another in the desired location: /var/log/stacktrace.log

      (this leads to security-implications during appserver-start.)

      either there is something wrong with my log-config or this is
      a bug.

       
      log4j = {
          appenders {
              console name: 'stdout', layout: pattern(conversionPattern: '%c{2} %m%n')
              file name: 'logfile', file: '/var/log/application.log', layout: pattern(conversionPattern: '[%5p] %d{HH:mm:ss} (%F:%M:%L)%n%m%n%n')
              file name: 'stacktraceLog', file: '/var/log/stacktrace.log', layout: pattern(conversionPattern: '%c{2} %m%n')
          }
          root {
              warn 'logfile', 'stdout'
              additivity = true
          }
      
          error stacktraceLog: "StackTrace"
      
          error  'org.springframework',
                 'org.hibernate'
      
          info   'com.mycompany.myapp'
      }
      

        Issue Links

          Activity

          Hide
          Helmut Denk added a comment -

          some guy has collected information about stacktrace.log
          in his blog: http://haxx.sinequanon.net/2008/09/grails-stacktracelog/

          Show
          Helmut Denk added a comment - some guy has collected information about stacktrace.log in his blog: http://haxx.sinequanon.net/2008/09/grails-stacktracelog/
          Hide
          Graeme Rocher added a comment -

          This config now works for me in HEAD:

          log4j = {
              appenders {
                  console name: 'stdout', layout: pattern(conversionPattern: '%c{2} %m%n')
                  file name: 'logfile', file: 'application.log', layout: pattern(conversionPattern: '[%5p] %d{HH:mm:ss} (%F:%M:%L)%n%m%n%n')
                  file name: 'stacktrace', file: 'mystacktrace.log', layout: pattern(conversionPattern: '%c{2} %m%n')
              }
              root {
                  warn 'logfile', 'stdout'
                  additivity = true
              }
          
              error stacktrace: "StackTrace"
          
              error  'org.springframework',
                     'org.hibernate'
          
              info   'com.mycompany.myapp'
          }
          
          
          
          Show
          Graeme Rocher added a comment - This config now works for me in HEAD: log4j = { appenders { console name: 'stdout', layout: pattern(conversionPattern: '%c{2} %m%n') file name: 'logfile', file: 'application.log', layout: pattern(conversionPattern: '[%5p] %d{HH:mm:ss} (%F:%M:%L)%n%m%n%n') file name: 'stacktrace', file: 'mystacktrace.log', layout: pattern(conversionPattern: '%c{2} %m%n') } root { warn 'logfile', 'stdout' additivity = true } error stacktrace: "StackTrace" error 'org.springframework', 'org.hibernate' info 'com.mycompany.myapp' }

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Helmut Denk
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development