title: how can I set the log4j conversionpattern at runtime
body: <p>I have a Java app while parses input from a spreadsheet. I've added the ability to run just the parser part standalone from an ant task. However the normal log4j pattern I'm using can make the output hard to read, I'd like to set a simple pattern at runtime.</p>
  
  <p>So something like <code>log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %m%n</code></p>
  
  <pre><code>        parseDebug = new Boolean(System.getProperty("ptpunit.parseDebug")).booleanValue();
  
          if(parseDebug){
  
              // SET CONVERSION PATTERN HERE
  
              log.setLevel((Level) Level.DEBUG);
  
          }
  </code></pre>