title: Why is there a space at the beginning of each line of my Logback-generated log file?
body: <p>I'm using Logback for logging.  At the beginning of each line after the first line is a space. Any idea why?</p>
  
  <p>Below is my logback.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration debug="true"&gt;
  
    &lt;property name="log.pattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS} %-5level [%logger{0}] %msg%n %ex"/&gt;
  
    &lt;property name="log.file.prefix" value="${app.home}/var/log/${app.name}"/&gt;
  
    &lt;appender name="DEFAULT" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;file&gt;${log.file.prefix}.log&lt;/file&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;fileNamePattern&gt;${log.file.prefix}.%d{yyyyMMdd}.%i.log.zip&lt;/fileNamePattern&gt;
          &lt;timeBasedFileNamingAndTriggeringPolicy
                  class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"&gt;
              &lt;maxFileSize&gt;500MB&lt;/maxFileSize&gt;
          &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;
      &lt;/rollingPolicy&gt;
      &lt;encoder&gt;
            &lt;Pattern&gt;${log.pattern}&lt;/Pattern&gt;
      &lt;/encoder&gt;
    &lt;/appender&gt;
  
    &lt;!-- info for everything else --&gt;
    &lt;root level="info"&gt;
      &lt;appender-ref ref="DEFAULT"/&gt;
    &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>This results in log output like the following (notice the first line doesn't have a a space):</p>
  
  <pre><code>2012/02/06 13:34:09.875 INFO  [BrokerService] Using Persistence Adapter: MemoryPersistenceAdapter
   2012/02/06 13:34:09.875 INFO  [BrokerService] ActiveMQ 5.3.1 JMS Message Broker (localhost) is starting
   2012/02/06 13:34:09.875 INFO  [BrokerService] For help or more information please see: http://activemq.apache.org/
   2012/02/06 13:34:09.953 INFO  [ManagementContext] JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
   2012/02/06 13:34:10.328 INFO  [BrokerService] ActiveMQ JMS Message Broker (localhost, ID:NZucker-NYL-3937-1328553250062-0:0) started
   2012/02/06 13:34:10.343 INFO  [TransportConnector] Connector vm://localhost Started
  </code></pre>