??? 06/18/04 18:52 Read: times |
#72746 - RE: Error logging for purpose of Maintenance Responding to: ???'s previous message |
Do you agree with that opinion or you think exact time stamping should be practiced routinely?
Exact (microsecond) no, but minute at least. Of course, if the errors are 'internal' (coding) a timestamp may not have much value, but for externally caused errors it is essential. The drawback of time stamping every occurrence of an error is the need to impractically large amount of memory If you log "minutes since the error log was read" you have 1000+ hours in 2 bytes. Also if you are so tight for memory that you can not save, say, 100 bytes for the error log you will be in trouble for other reasons If you decide on a circular buffer, the one thing you must guard against is a permanent error being logged and logged and logged. I personally do not like circular error logs, If an error appear once every 10 minutes it does not take a long time before that is all there is in the log. In an industrial application I built an error log that could hold max 5 errors and the last 5 times they occurred (error#, time,time,time,time,time) 5 times. If more than 5 error codes occured, the system shut down with a maintenance light lit. Erik |