Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging ASP.NET application at run-time
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01374333
Message ID:
01374495
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform