jaymz69
asked on
Best way to Create an Error Log for text or .DBF
What is the best approach to creating an Error Log?
when the program crashes and wants to send to Microsoft I also want to see what happened in one of the PRG's
when the program crashes and wants to send to Microsoft I also want to see what happened in one of the PRG's
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't rely on people to call and also users are not knowledgeable enough to give you the right information.
In my email error message I also include IP address, UserID, ClientID so I know what person and what type of machine he has. This also saves a lot of time on the phone. Then they liveupdate the software.
Also your error handler should be smart enough to handle other types. There are some errors in MS Office for example which are known. I trap them and let the software continue. Also there are error using Internet Explorer. All this depends on your application.
There are some errors that require a retry after some time. You should handle that.
There are some errors that the user might have two sessions of your program open due to exclusive access. You should handle that as well.
In my email error message I also include IP address, UserID, ClientID so I know what person and what type of machine he has. This also saves a lot of time on the phone. Then they liveupdate the software.
Also your error handler should be smart enough to handle other types. There are some errors in MS Office for example which are known. I trap them and let the software continue. Also there are error using Internet Explorer. All this depends on your application.
There are some errors that require a retry after some time. You should handle that.
There are some errors that the user might have two sessions of your program open due to exclusive access. You should handle that as well.
ASKER
the retry iafter some time would be a good one to on a couplr of prg
ASKER
so you textmerge an then can email that?
The textmerge stays on the users' PC. He sends it by email later or you can prompt it to be send using his Outlook or any SMTP client.
oEmail = CREATEOBJECT(''')
I also have another procedure which I wrote that sends the error log via a website which I create.
http://www.mywebsite.com/errorhandler?appname=MyApp&error=1&line=100
Something like that.
That website sends the support team the email.
oEmail = CREATEOBJECT(''')
I also have another procedure which I wrote that sends the error log via a website which I create.
http://www.mywebsite.com/errorhandler?appname=MyApp&error=1&line=100
Something like that.
That website sends the support team the email.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes you can do an FTP upload but it's not that secure.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In regard to the normal error logging: I do save into a local free table, not only errors but also selfgenerated things and put that into a syslog. eg it logs when the app is started and when it's shutdown and if the last message that is found in there at a new start is not the last shutdown it therefore also detects a crash and may take additional checks before continuing with the normal startup.
I collect these local log records into a global/central log. I don't mail from customers which have maintainance and support level contracts and where I am from time to time anyway.
If it would be a standalone app or a customers site I won't visit regularly, I'd also opt for mailing this log, in an aggregated version, eg you of course often have the same error message many times from several users. It's not unusual, if our biggest customer collects hundreds of MB per month, so I even integrated a routine checking for the 2GB limit that would then create a new central log table, if that get's larger than 1.5 GB.
Bye, Olaf.
I collect these local log records into a global/central log. I don't mail from customers which have maintainance and support level contracts and where I am from time to time anyway.
If it would be a standalone app or a customers site I won't visit regularly, I'd also opt for mailing this log, in an aggregated version, eg you of course often have the same error message many times from several users. It's not unusual, if our biggest customer collects hundreds of MB per month, so I even integrated a routine checking for the 2GB limit that would then create a new central log table, if that get's larger than 1.5 GB.
Bye, Olaf.
an important thing is privacy: Only "send home" error informations, no personal data and only after the user confirms he wants to send out this. Otherwise you may end up with a spyware rating from virus/spyware scanners.
The latest thing I plan to do is sending very important errors and other informations via twitter direct messages to a corporate twitter account.
Bye, Olaf.
The latest thing I plan to do is sending very important errors and other informations via twitter direct messages to a corporate twitter account.
Bye, Olaf.
ASKER
Thanks for all of your help
ASKER
it can be up to 24 hours before someone calls.
I like the email and log file so no matter what you should have a way to read into it and before the calls start....