Details

    • Type: Sub Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Quality Assurance
    • Labels:
    • Rice Team:
      QA

      Description

      Below is the script I use locally to have a new log file for each run. An option to enable this might be part of the solution for the QA-backlog jira. I've found this very useful while developing too.

      http://veerasundar.com/blog/2009/08/how-to-create-a-new-log-file-for-each-time-the-application-runs/ (with class renamed to NewLogFileForEachRunAppender)

      log4j.appender.fileout = com.veerasundar.dynamiclogger.NewLogFileForEachRunAppender
      log4j.appender.fileout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c - %m%n
      log4j.appender.fileout.layout = org.apache.log4j.PatternLayout
      log4j.appender.fileout.File = /r/logs/logs.logs
      
      echo "updating log4j.properties"
      echo "s|/r/logs/logs.logs|/r/logs/$1/logs.logs|g" > $1-log4j.sed
      
      sed -f $1-log4j.sed /r/log4j.properties  > /r/$1/sampleapp/src/main/resources/log4j.properties
      sed -f $1-log4j.sed /r/log4j.properties  > /r/$1/standalone/src/main/resources/log4j.properties
      sed -f $1-log4j.sed /r/log4j.properties  > /r/$1/$1-log4j.properties
      
      mkdir -p core/impl/src/main/java/com/veerasundar/dynamiclogger
      cp ../NewLogFileForEachRunAppender.java core/impl/src/main/java/com/veerasundar/dynamiclogger/
      

      Current version of this script can be seen at https://github.com/eghm/rtools/blob/master/bin/rDtsLogFiles.sh

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              eghm-kuali-m Erik Meade
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: