Re: Error log design...

From: Gerald Bonnstetter (bonnsoft_at_antispamstuffnetins.net)
Date: 01/05/05


Date: Wed, 05 Jan 2005 09:56:23 -0600

Richard H. wrote:

> "s.subbarayan" wrote:
>
>> I am currently working on a project where we are
>>asked to display the error logs on the hyperterminal
>>on the press of the key.Typically the log should
>>collect all the error messages and if and only if
>>the user presses a key on my H/W I will display it
>>on the hyper terminal.
>
>
> It seems the first problem is in the specs. I'd suggest that logging
> "all the errors" is not a valid requirement - there must be a finite
> limit, especially if the RAM you're testing must also be used for the
> log buffer. So, set this limit to a reasonable number of log entries,
> possibly with an option for full detail on-the-fly.

I like the idea of a limit. He/she might also include a count of all
the errors found, even the ones not saved.

I would also remove all the redundant text from the messages and replace
it with an error code number. That code number would only need to be a
byte or two long. And the error code would tell you how much data follows.

So "Single bit error at 0x004562" could store as 0x01 0x00 0x45 0x62 and
"Multi bit errors form 0x001365 to 0x002366" could be 0x02 0x00 0x13
0x65 0x00 0x23 0x66. And so on... This data would be saved in your
linked list or whatever you are using.

If you have more complex messages you may need to adjust the format used
for message storage.

> Perhaps...
> a) Capture a limited number of errors in buffer (assuming that beyond a
> point may be a "critical failure" anyway)
> b) Output the limited buffer when button is pressed
> c) Offer a "verbose" diag mode that generates the hyperterminal output
> on-the-fly as your tests are running, with all the detail you'd care to
> include. (For example, if button is held down when diags start; or
> button is pressed in the first 3 seconds after power-up, etc.)