Elmah logs hundreds of files

100 Views Asked by At

Learned error logging from this and using this . But Elmah logs one file to each error, and we end up with hundreds of hundreds of XML files. How can I set it up to log an entire day to one XML file?

This is my config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
    <sectionGroup name="elmah">
      <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
      <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
      <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
    </sectionGroup>
  </configSections>

....

  <elmah>
    <security allowRemoteAccess="yes" />
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="C:\elmahlog" />
  </elmah>

</configuration>
0

There are 0 best solutions below