views:

92

answers:

1

using elmah i can save error log on database,email,xml .They are individually works well .I want to work in together.Suppose in my config file i can can active server log than i can not active xml log but i want to work on both .How to do.

 <elmah>
        <!-- Change this to 1 to allow remote access. If you do, be sure to lock down the elmah.axd file! -->
        <security allowRemoteAccess="1" />
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ReviewsConnectionString" />

  <!--Storing errors in XML files-->
      <!--<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />-->

  <!--<errorMail
          from="[email protected]"
          to="[email protected]"
          subject="..."
          async="true"
          smtpPort="0"
          useSsl="true"
          />-->    
</elmah>

 <system.net>

      <mailSettings>
        <smtp deliveryMethod="Network">
          <network host="smtp.gmail.com"
          port="587"
          userName="xxixddixx"
          password="1234" />
          </smtp>
        </mailSettings>
 </system.net>

if i cative server log on tag it's work well than i need to deactivate rest of log storage process like : xml,mail-notification etc.If i active Xml log than it's work well than i need to deactivate rest of them .But if i active both of them then it does not work**.I want they active on same time.How to active them in the same time.if i active **mail log it does not work .I don't know why it's not work.

**1) How to active Server log and Xml log on same time.
2) How to active email log with 1) and individually why it's not work?** 

I want error log will save on database, save on specified folder as xml formate, and also want to send email notification how to active them in the same time.

A: 

I was looking for the same reason- if the SQL database was down, I still wanted to know about the error. I came across this page: http://groups.google.com/group/elmah/browse_thread/thread/5bd0c95d22aef687/cb29bc5b6ed9a766?lnk=gst&amp;q=filter which states it's not directly possible via config, however suggests a way to achieve it.

There's also some detail on this post here: http://stackoverflow.com/questions/758092/elmah-sql-error-handler-database-not-available-what-happens-to-logging

I've used the approach of SQL + Email logging, given it's unlikely both will be unavailable concurrently.

mos