Jump to content

EventLogReporter: Difference between revisions

From auWiki
m Public Functions: line breaks after code lines
m Public Functions: rename Functions -> Methods
 
Line 11: Line 11:
Services can create an object from this class and use it to report messages into the Windows Application Event Log.  The object should be of type [[Reporter]] even though the EventLogReporter constructor is used, in order to more easily switch between other types of reporters.
Services can create an object from this class and use it to report messages into the Windows Application Event Log.  The object should be of type [[Reporter]] even though the EventLogReporter constructor is used, in order to more easily switch between other types of reporters.


==Public Functions==
==Public Methods==
===new EventLogReporter===
===new EventLogReporter===
<code>EventLogReporter(string eventSource)</code>
<code>EventLogReporter(string eventSource)</code>

Latest revision as of 08:13, 18 July 2007

C# class that reports a message to the Windows event log (for services without a user interface).

Namespace

au.util.io

Hierarchy

Usage

Services can create an object from this class and use it to report messages into the Windows Application Event Log. The object should be of type Reporter even though the EventLogReporter constructor is used, in order to more easily switch between other types of reporters.

Public Methods

new EventLogReporter

EventLogReporter(string eventSource)

Creates an EventLogReporter object, and adds the specified event source to the Windows Application Event Log if it doesn't already exist.

  • eventSource = Text to show in the source column of the event viewer.

Report

void Report(string title, string message, string debugDetail, MessageType mType)

Reports a message to the Windows Application Event Log. Overrides Reporter.Report()

  • title = Beginning of event log message.
  • message = The actual message, user-friendly.
  • debugDetail = Details to display at end of message.
  • mType = Type of message being reported.