Installation Steps

Choose & Configure Datastore(s)

  • You can choose as many as you wish, including multiples of the same type

SqlServer
  1. Choose a schema to store the data in (Either an existing or create a new one)
  2. Run SqlServer.sql to configure the schema
  3. Configure Sql Server Logging
  • Tested with sql server 2008
  • Should work with sql server 2005 and possibly 2000

MySql
  1. Choose a schema to store the data in (Either an existing or create a new one)
  2. Run MySql.sql to configure the schema
  3. Configure MySql Server Logging

Postgre
  1. Choose a schema to store the data in (Either an existing or create a new one)
  2. Run Postgre.sql to configure the schema
  3. Configure Postgre Server Logging

Email
  1. [Configure Email Logging]

Modify Web.config of application(s) to be monitored

*ConfigSections
  1. add the elmah2 declarations
<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="elmah2"> <!-- Required -->
           <section name="loggers" requirePermission="false" type="elmah2.core.config.LoggerSection, elmah2.core" /> <!-- This is required -->
           <section name="filters" requirePermission="false" type="elmah2.core.config.FilterSection, elmah2.core" /> <!-- This is required -->
           <section name="application" requirePermission="false" type="elmah2.core.config.ApplicationSection, elmah2.core" /> <!-- This is required -->
        </sectionGroup>
    </configSections>
</configuration>


*elmah2
<?xml version="1.0"?>
<configuration>
  <elmah2><!-- Required -->
    <loggers><!-- Required -->
        <!-- Logger Configuration Here (at least 1 required) -->
    </loggers>
   <filters> <!-- Optional -->
      <!-- Filter Configuration Here -->
    </filters>
    <application Name="TestApp"/><!-- Required, this should be unique or knowing what app the error is coming from could be rather difficult -->
  </elmah2>
</configuration>


*Modules
  • For IIS 6
<?xml version="1.0"?>
<configuration>
	<system.web>
		<httpModules>
			<add name="ErrorLog" type="elmah2.ErrorLogger, elmah2"/>
		</httpModules>
	</system.web>
</configuration>

  • For IIS 7
<?xml version="1.0"?>
<configuration>
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<add name="ErrorLog" type="elmah2.ErrorLogger, elmah2"/>
		</modules>
	</system.webServer>
</configuration>
  • Note You can put it in both sections with no harm

*assemblies
<?xml version="1.0"?>
<configuration>
	<system.web>
		<compilation debug="true">
			<assemblies>
				<add assembly="elmah2" />
				<add assembly="elmah2.core" />
				<!-- Additional modules as required -->
			</assemblies>
		</compilation>
	</system.web>
</configuration>

Choose and configure filters (optional)

[Http Status Code Filter]
Example Completed Logger Config

Configure Viewer (optional)

  1. Add a new website into IIS
  2. Download and extract the files from the "viewer package" into the new web root (or virtual app)
  3. Configure it just like you did the logger above, but its for the connection to the data store(s)

ScreenShots
Example Viewer Config

This will allow you to aggregate logs from multiple data stores together

Last edited Jun 16, 2010 at 12:51 AM by iamkrillin, version 8

Comments

No comments yet.