Dotnet 4 - Writing to event log

S

stainless

Hi,
I'm trying to write to the event log but I can't use net4log or nlog because they're open source and so aren't supported software. Has anyone written their own event logger? It only needs to be simple, I want to write a basic message to the application log.
 
A

Arne Vajhøj

Hi, I'm trying to write to the event log but I can't use net4log or
nlog because they're open source and so aren't supported software.
Has anyone written their own event logger? It only needs to be
simple, I want to write a basic message to the application log.

Many open source projects has better support than even very
expensive commercial closed source projects - and if you are
willing to pay for support, then there should be plenty of
consultants that could support a specific piece of open source.

But company policy may be as it is, so let us assume that is
a no go.

Writing to the event log is very simple.

Minimal example:

EventLog.WriteEntry("Application", "This is a test",
EventLogEntryType.Information);

See docs for more options.

Arne
 
J

Jeff Johnson

I'm trying to write to the event log but I can't use net4log or nlog
because they're open source
and so aren't supported software. Has anyone written their own event
logger? It only needs
to be simple, I want to write a basic message to the application log.

A) Tell your corporate big-wigs that their prejudice is outdated.

B) Microsoft created a set of libraries called "Application Blocks," and
logging was one of them. Is Microsoft considered a trusted company in the
eyes of those corporate big-wigs?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top