|
One place I worked logged all errors to a disk file.
Including "Disk Full"
They also moved the cursor off the screen, some VP was offended by the blinking cursor at startup, so errors were not visible then either.
Psychosis at 10
Film at 11
Those who do not remember the past, are doomed to repeat it.
Those who do not remember the past, cannot build upon it.
|
|
|
|
|
I just log to stderr and stdout. Every logging software I've used a can read that easily. It's not my applications job to specify where the logs end up.
|
|
|
|
|
That's what the bug tracker is used for, right?
|
|
|
|
|
But in the rare occasions that they do - I log the error to a file, using an API that allows us to filter types and severities of errors that will be logged.
Using the O/S' error logging mechanism is a problem - clients can't easily send you the log.
Using 3rd-party error logging is also a problem - most clients don't want their stuff on the cloud.
That leaves various local options, which all translate to writing stuff to a file.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
We are using Serilog with Seq, I found Serilog to be a very good option compared to log4net or other.
|
|
|
|
|
Our desktop applications have no need for keeping error logs. The error is reported to the end user who either sends me a screenshot or calls to report it.
Web applications, either self-hosted or cloud, create their own error logs. There are a few 'exceptions' where very specific errors are logged to a custom database table.
Since I'm mostly monitoring IIS (ftp/w3) log files, I naturally built my own log file viewer.
"Go forth into the source" - Neal Morse
|
|
|
|
|
kmoorevs wrote: Since I'm mostly monitoring IIS (ftp/w3) log files, I naturally built my own log file viewer. Open source?
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
- Popup a message box on the server
- Have a camera recording live video of the screen
- Video streamed to the cloud
- AI service on cloud looks for possible pop-ups in video stream
- When a pop-up is detected, the text is OCR'd out of the frame
- The text is printed out
- An IOT robot picks up the print-out, and puts it into an envelop
- A human employee takes this envelop and ships it via 1 day FedEx to the developer
- Developer receives it next day, and timely debugging ensues
|
|
|
|
|
Come to think about it, this is the only way to log errors, true or not.
|
|
|
|
|
Absolutely, and you and I get it because of our vast experience with that sort of advanced logging!
|
|
|
|
|
Nish Nishant wrote: A human employee takes this envelop and ships it via 1 day FedEx to the developer
In order to save money, I recommend only high level errors be sent with one day shipping.
|
|
|
|
|
So, you would suggest 2 day for non-priority logs?
|
|
|
|
|
First class is the cheapest and takes at least three days.
|
|
|
|
|
Nish Nishant wrote: Have a camera recording live video of the screen
You should have another video stream for keyboard and mouse input
My plan is to live forever ... so far so good
|
|
|
|
|
|
We do the same thing.
Hogan
|
|
|
|
|
I did write something that we now use in all of our applications that used log4net to write to various outputs (file, database, console). Have just switched to NLog as it appears to be the fastest and most reliable.
Benchmarking 5 Popular .NET Logging Libraries[^]
Keep your friends close. Keep Kill your enemies closer.
The End
|
|
|
|
|
I prefer NLog to be honest, but I have to use log4net currently, as that is what the project I am working on has been using.
|
|
|
|
|
Each function has it's own header - changes, updated, bug-fixes, &etc are all noted in the header along with the date. On the occasion that it's a substantial change, details are included.
Also - the new/modified code is noted with the date of change and noted with a why.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
What does this have to do with logging errors?
Aren't you using source control to manager changes, bugs, etc.? (Git, SVN, something?)
|
|
|
|
|
Logging - essentially keeping a record with some chronology.
So - when there's an error I note it in the location where it was found.
On that basis, I guess I'll send a few ???'s to you w.r.t you question.
If the interpretation is supposed to be logon-attempt errors then it should have been made explicitly clear that it was limited to that scope. Or perhaps I should think like a lumberjack?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
The question is how do you log errors. In other words, when your code generates an error do you log that error to a file, to a database, etc?
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
And I told you what I did.
Why does it have to be to a separate file or database to count, to you, as an answer?
In-situ is a place where it's relevance is not lost. Relevant history, if any, is contiguous.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
That's not the sort of error logging the survey's asking about.
It's asking when your application encounters an error (eg File Not Found); how is that error recorded/reported/etc at rutime to you so that it can be fixed.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
That's how you read it. File not found doesn't have to be an addressable error at all, but rather, user error. So - that view - as I see it, is altogether wrong.
The Apache error log records every nuance - an no rational human being would really want to go through that for things like file not found.
On the other hand, undefined index, a real error, is also there. That can be fixed. How many copies of that message ought you keep? More than one is ludicrous.
You, and some others, saw a narrow scope in what an error is and what logging it means.
For me, an error log of my code is something I can find useful - not just a huge list of what will surely be redundant complaints by the system.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|