Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How do I do logging in .Net ?

0 views
Skip to first unread message

Siva M

unread,
Jul 10, 2005, 11:50:10 AM7/10/05
to
Not sure what exactly is required. Assuming you want to implement logging
functionality in your app, you can use Microsoft logging & instrumentation
application block:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/logging.asp


"yaron" <ya...@discussions.microsoft.com> wrote in message
news:577A2AD8-B3F8-42EF...@microsoft.com...


veera sekhar kota

unread,
Jul 11, 2005, 5:48:03 AM7/11/05
to
Hi Yaron,

The following is one of the standard tool for logging in C#...

Log4net is a tool to help the programmer output log statements to a variety
of output targets. log4net is a port of the excellent log4j framework to the
.NET runtime.

Link: http://logging.apache.org/log4net/

Marinus Holkema

unread,
Jul 11, 2005, 8:48:05 AM7/11/05
to
The following code creates a Custom Log where you can write event to:

eventLog1 = new System.Diagnostics.EventLog();
if (!System.Diagnostics.EventLog.SourceExists("Transaction Service"))
{
System.Diagnostics.EventLog.CreateEventSource("Transaction Service",
"Transaction Log");
}
eventLog1.Source = "Transaction Service";


The following code actualy adds an event to the created log.

eventLog1.WriteEntry("MyWindowsService_CSharp Started",
EventLogEntryType.Information);


--
Marinus Holkema

http://marinusholkema.blogspot.com/

yaron

unread,
Jul 10, 2005, 10:50:02 AM7/10/05
to
0 new messages