title: Log to rolling CSV file with Enterprise Library
body: <p>I need logging to:</p>
  
  <ol>
  <li>Rolling file, to avoid 1 big log file.</li>
  <li>CSV format for easier look up.</li>
  </ol>
  
  <p>I can see the EntLib (5.0) has the <code>Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener</code> to log to a rolling log file.</p>
  
  <p>To make the log entries look like a CSV row, I can change the <code>Formatters.TextFormatter.Template</code> to put double quote around the values, and also change the Listener's Footer and Header to nothing, so they won't be output.</p>
  
  <p>Under normal circumstance, this would give me a well formed CSV file. However if a token value in the <code>Template</code> contain a double quote, this would not be escaped. Hence the log file become an invalid CSV file.</p>
  
  <p>Is there any way to resolve this?</p>
  
  <p>Is there any alternative solutions to this problem?</p>