views:

67

answers:

2

Hi

People who talk about loggers here never talke about EventLog, I think this is good for windows system. Is it reliable, or I found it dead in some bad morning?

EventLog let you can create a specific folder or folders for your application, I I am thinking in EventLog because both Front End and Back End and anything on the server can log into it.

So It is transparent, across applications and we can put our logging in specific folder, so I don't have to look into the zillion sys info messages.

Why not logging everything at SQLServer, I am creating E-Commerce website, if SQL server down the website will be down anyway. but I am worry about temporally connection failure, what do u think?

Why everyone like files, it can be in great size, too big to handle, or maybe I will create another file when a file is too big, and I can create a file with a date.

Some one tried MS Enterprise library? talk to me about it.

Thanks

+5  A: 

I think some people choose files because it is the easy option and you get the benefit of only logging the information you really want to capture. If you use the Windows event log, you are stuck trying to search through the thousands of OS events that occurred in the same minute as the log entry you are looking for.

I would suggest a logging framework that will handle your needs without weighing you down with extra junk you don't need.

I think the most commonly used logging framework for the .NET platform is log4net. But, you'll have to find the one that is best suited for your project.

Here's a related logging SO question to help you out.
http://stackoverflow.com/questions/98080/what-is-the-best-logging-solution-for-a-c-net-35-project

Personally, I can't think of a single reason in which I would primarily use the Windows OS logs for my e-commerce application.

Robert Greiner
I would add that eventlog is ok for reporting critical errors. So critical errors should go both into your own log file and into the eventlog. Logging to SQL is just plain silly.
MK
The Event Viewer does support segregated application-specific events.
Mike Burton
re read my question for event log
Tony
@Robert - Either I misunderstand your post or you seem to have misunderstood how the Event logs can be used. Using application specific logs your critique doesn't make sense. Though I agree that log4net is a good possible solution.
ho1
@Ho I probably could have been clearer. I'm saying that I don't see why you would want to use the Event Logs as your primary logging method on an e-commerce website.
Robert Greiner
That makes sense, I just misread your answer as being negative to the Event log for all kinds of software.
ho1
oh, my apologies. Thank you for bringing it to my attention. In fact, I'm going to edit my question to make the answer clearer.
Robert Greiner
A: 

I do use the Event log quite a bit, especially when I write Windows Services. It's very useful in locked down environments when the SysAdmins don't want you to write to the filesystem. In general I think SysAdmins quite appreciate it also since they can easily find all the important logs in one place (separated by app though as you say) without having to go looking for logfiles, but you have to be careful to not write too many entries since it can get a bit difficult to read compared with a nicely formatted text log.

I'd be reluctant to log in a database unless the logged information was used by another process (as in, I've done my work, now it's your turn to do your bit), but I'm not sure if there's any real reason to avoid that and might used be me not being used to that.

ho1