Tech Off Post

Single Post Permalink

View Thread: Error-Logging Class, input please.
  • User profile image

    about logging, look at this snipet:

     <!--  Event Log Provider being added. -->
        <add name="EventLogProvider" type="System.Web.Management.EventLogWebEventProvider,System.Web,..." />
     <!--  Event mapping provides a friendly name to the events based on the WebBaseErrorEvent class.  -->
        <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent,System.Web,.." startEventCode="0" endEventCode="2147483647" />
     <!-- Rule tying the "All Errors" event mapping to the EventLog Provider.  -->
        <add name="All Errors Default" eventName="All Errors" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />

    this goes in the web.config
    it will log events to the event log, you can also use the same setup to send data to sql server or other targets.

    and I think you can raise custom events in your web code that get logged the same way.
    so you could raise a "user opened form" event and a "user added foo" event and so forth...