title: Changing ELMAH database in code
body: <p>I have several websites that have separate ELMAH databases. I would like to have one separate website to view all these databases.</p>
  
  <p>I've created a new ASP.NET MVC 4 website for this purpose. I've added the NuGet package "Elmah.MVC" and added the following to Web.config:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="Elmah.Sql" connectionString="..." /&gt;
  &lt;/connectionStrings&gt;
  &lt;elmah&gt;
      &lt;errorLog type="Elmah.SqlErrorLog" connectionStringName="Elmah.Sql" /&gt;
  &lt;/elmah&gt;
  </code></pre>
  
  <p>This works just fine going to a single database. I can also switch database by changing the connectionstring, but now I want to be able to switch database from code. Is there a way to do that?</p>