Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging ASP.NET application at run-time
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01374333
Message ID:
01374495
Views:
28
>I am sure it is simple if everything works. And I have been doing this work long enough to know that things don't always work right. And actually I decided to go back to creating token/sample files. I am concerned that if I write something to the log and the customer finds any problem on the server (at a later date), they will point a finger at me (vendor).


using System;
using System.Diagnostics;


string sSource = "My App";
string sLog ="Application";
string sEvent = ex.Message; // put your text to be read here.

// now write this to the log
//EventLog.CreateEventSource(sSource,sLog); If you were creating your own
EventLog.WriteEntry(sSource,sEvent);
EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234);


HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform