Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error log
Message
From
04/11/2008 18:42:21
 
 
To
27/10/2008 11:12:21
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01356350
Message ID:
01359663
Views:
27
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform