Application Info and Error logging
-
I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,
ASCII stupid question, get a stupid ANSI
-
I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,
ASCII stupid question, get a stupid ANSI
Collin Jasnoch wrote:
Anyone done any speed comparisons in getting the info to file or the Event Logs?
Never done so; logging an exception is something that happens exceptionally, not every second. The EventLog is not the right place if you're logging a lot of traffic, but it is the right place to report problems to the SysAdmin of that network. I think that you shouldn't be checking whether it's "speedy" enough, but rather if you can easily get all the information from it that you need. The fact that one can read an EventLog remotely doesn't matter much to me, as one can do the same with a simple text file.
I are Troll :suss:
-
I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,
ASCII stupid question, get a stupid ANSI
Never had reason to test it, but I'm quite confident that speed is not an issue. I'd use a framework such as the Microsoft Enterprise Library Exception Handling Block and Logging Application Block to give you the flexibily to change where and how you store such information if an issue does arise with one method.
I know the language. I've read a book. - _Madmatt
-
Collin Jasnoch wrote:
Anyone done any speed comparisons in getting the info to file or the Event Logs?
Never done so; logging an exception is something that happens exceptionally, not every second. The EventLog is not the right place if you're logging a lot of traffic, but it is the right place to report problems to the SysAdmin of that network. I think that you shouldn't be checking whether it's "speedy" enough, but rather if you can easily get all the information from it that you need. The fact that one can read an EventLog remotely doesn't matter much to me, as one can do the same with a simple text file.
I are Troll :suss:
-
I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,
ASCII stupid question, get a stupid ANSI
-
Eddy Vluggen wrote:
The EventLog is not the right place if you're logging a lot of traffic
So what would be the right place?
ASCII stupid question, get a stupid ANSI
Collin Jasnoch wrote:
So what would be the right place?
For a lot of traffic, I'd go for a textfile and import that into a database. Easy to zip & mail, and appending text to a file doesn't cost much cpu-time. This is ideal for logging lots of data, as you can simply dump it without much ado. It would also be the best place to hide your exceptions from the customer if you wanted to - you can encrypt the string before writing it. The EventLog would be the ideal place for exceptions, and general diagnostic events. Things like starting a service, or registering a new license.
:suss:
-
I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,
ASCII stupid question, get a stupid ANSI
Log4Net provides a good way of performing the logging you need. The speed has allways been more than adequate for my purposes. The Log file can be configured in the app.config file and can be sent to single or multiple destinations (event log, database, text file etc), and what is logged is customisable. Log4Net is also fail-safe (ie almost never throws and error that stops your code), which is good for trace and error logging. Logging is not guaranteed (due to the fail-safe nature, a failure results in no message) and is therefore no good for audit requirements, but once you have it is configured and tested, I've not seen a message missed so it is pretty reliable.
CCC solved so far: 2 (including a Hard One!) 37!?!! - Randall, Clerks