Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error log
Message
De
04/11/2008 18:42:21
 
 
À
27/10/2008 11:12:21
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01356350
Message ID:
01359663
Vues:
26
There appears to be three different logging types in MM (EventLog, TraceLog, and TransactionLog). You can write to one of these logs by using the following methods:

WriteException
WriteWarning
WriteInfo
WriteTrace
WriteTransaction

WriteException creates an entry in the Application category in the Windows Event Log as an "Error", WriteWarning creates an entry as a "Warning", and of course WriteInfo creates an entry as "Information". The source is the ApplicationName defined in App.cs.

WriteTransaction creates an entry in the same Application category in the Windows Event Log as "Information". However, the source is defined as (trx) + ApplicationName. This is kind of strange as I was expecting the Transaction Log to use a different event category called Transaction.

Now the really strange behavior is with WriteTrace. When I step through the code, it behaves differently than the other two and it tries to create an XML file that I think is supposed to be called EventLog.xml. The string variable holding the file name actually contains "Application" and I don't see it creating an XML file or an entry in the Windows Event Log.

I could use some clarification. How is the WriteTrace method supposed to work? What is the intent of the WriteTransaction method if it is just creating another entry in the Application with (trx) prepended to the source.

Thanks,

Al
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform