title: Log4Net output to Mongo
body: <p>Does anyone had the luck to have this configured correctly?</p>
  
  <ul>
  <li>Created an account on <a href="https://mongohq.com/home" rel="nofollow">MongoHQ</a></li>
  <li>Added a new user <a href="http://balexandre.com/temp/2011-10-27_1425.png" rel="nofollow">to the database</a></li>
  <li>Created a new Collection named <code>logs_net</code></li>
  <li>Added <a href="http://www.nuget.org/List/Packages/log4mongo-net" rel="nofollow">log4mongo-net library</a></li>
  <li>Added the configuration to the <code>web.config</code></li>
  </ul>
  
  <p><code>&lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;</code></p>
  
  <p>and</p>
  
  <pre><code>&lt;log4net&gt;
    &lt;appender name="MongoAppender" type="log4net.Appender.MongoDBAppender, log4mongo-net"&gt;
       &lt;!-- MongoDB connection options --&gt;
       &lt;host value="staff.mongohq.com" /&gt;
       &lt;port value="10048" /&gt;
       &lt;databaseName value="d1741d63-46b1-4a44-9c21-8a85cecae45b" /&gt;
       &lt;collectionName value="logs_net" /&gt;
       &lt;userName value="balexandre" /&gt;
       &lt;password value="myPassWorD" /&gt;
    &lt;/appender&gt;
  </code></pre>
  
  <p></p>
  
  <ul>
  <li>Added <code>log4net.Config.XmlConfigurator.Configure();</code> to <code>global.asax</code> under <code>Application_Start()</code></li>
  </ul>
  
  <p>and added some info:</p>
  
  <pre><code>ILog logger = LogManager.GetLogger(this.GetType());
  logger.Info("MainController Initialize test");
  </code></pre>
  
  <p>And... I can't get logs into MongoDB, <strong>any help?</strong></p>
  
  <p>By the way, the Database name is not the correct one, neither the password, and if I use <code>log4net.Appender.RollingFileAppender</code> it works great.</p>