title: log4net (common.logging) erroneous exception
body: <p>I have the following log4net statement in a c# application:</p>
  
  <pre><code>log.Info(CultureInfo.InvariantCulture, m =&gt; m(notice));
  </code></pre>
  
  <p>with the string contents of:</p>
  
  <pre><code>notice = "Checking: 645: Bp $B!!:{4V7r;K Bp $B$D$^$M$5$S (B &lt;xxx@xxxxxx. Co. Jp&gt; (B &lt;xxxxx@xxxxxxx.Com&gt;)"
  </code></pre>
  
  <p>causing this exception:</p>
  
  <blockquote>
    <p>[Common.Logging.Factory.AbstractLogger+FormatMessageCallbackFormattedMessage]System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
           at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
           at System.String.Format(IFormatProvider provider, String format, Object[] args)
           at Common.Logging.Factory.AbstractLogger.FormatMessageCallbackFormattedMessage.FormatMessage(String format, Object[] args)</p>
  </blockquote>
  
  <p>If you notice in the string (which, in this case, is a totally piece of garbage) there is a single bracket "{".  I'm fairly certain that this is causing the exception.  What can I do to avoid this?  Escape the string somehow?</p>
  
  <p>It's a fairly harmless exception, except that it shows up in the log file and is distracting.</p>