RE: [GD-General] runtime error logging
Brought to you by:
vexxed72
|
From: Tom F. <to...@mu...> - 2003-07-22 17:12:37
|
The reason is lost in the mists of time, but I think it was so you could do
obscure things like:
if ( type == TYPEA )
{
ERROR ( "Error in thingie of type 'A'" );
}
else if ( type == TYPEB )
{
ERROR ( "Error in thingie of type 'B'" );
}
...though actually you could have changed those to:
ERROR ( "Error in thingie of type %s", "A" );
ERROR ( "Error in thingie of type %s", "B" );
Oh, there probably was a good reason for it, many years ago :-)
Tom Forsyth - Muckyfoot bloke and Microsoft MVP.
This email is the product of your deranged imagination,
and does not in any way imply existence of the author.
> -----Original Message-----
> From: Gareth Lewin [mailto:GL...@cl...]
> Sent: 16 July 2003 07:46
> To: gam...@li...
> Subject: RE: [GD-General] runtime error logging
>
>
> Silly questoin, but couldn't you hash the string before the
> params were
> evaluated ? So you would just hash "Unknown effect '%s' in
> mesh '%s'\n"
>
> > -----Original Message-----
> > From: Tom Forsyth [mailto:to...@mu...]
> > Sent: 14 July 2003 17:03
> > To: gam...@li...
> > Subject: RE: [GD-General] runtime error logging
> >
> >
> > We do three things. (1) surround high-frequency info with
> > single quotes. (2)
> > hash the characters _not_ in single quotes. (3) check hash
> > against a list of
> > "I've already reported that" errors. So you have:
> >
> > LOG_ERROR ( "Unknown effect '%s' in mesh '%s'\n",
> > sEffectName, sMeshName );
> >
> > So this is a spritnf-style format string, and will come out
> > to be something
> > like:
> >
> > Unknown effect 'WATRE' in mesh 'blah.x'
> > Unknown effect 'WATRE' in mesh 'blah2.x'
> > Unknown effect 'WATRE' in mesh 'blah3.x'
> >
> > ...so then we remove everything in single quotes:
> >
> > Unknown effect in mesh
> > Unknown effect in mesh
> > Unknown effect in mesh
> >
> > ...and hash those. And of course they all come out with the
> > same hash value
> > and only the first one gets reported if you click on "Ignore
> > all" in our
> > little dialog box.
> >
> >
> > Tom Forsyth - Muckyfoot bloke and Microsoft MVP.
> >
> > This email is the product of your deranged imagination,
> > and does not in any way imply existence of the author.
> >
> > > -----Original Message-----
> > > From: Andras Balogh [mailto:bn...@ma...]
> > > Sent: 14 July 2003 16:41
> > > To: gam...@li...
> > > Subject: [GD-General] runtime error logging
> > >
> > >
> > > There are some cases when I have to deal with runtime errors that
> > > cannot be seen before, such as when the user executes an invalid
> > > script. I can handle these events, but I would also like
> to log them
> > > somewhere. The problem is that these invalid events may happen in
> > > every frame (or even multiple times a frame) flooding the
> > log file in
> > > no time...
> > >
> > > Any ideas on how I could do "singleton" logging of errors?
> > > Can't think of any simple solution :(
> > >
> > > thanks,
> > >
> > > Bandi
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: Parasoft
> > > Error proof Web apps, automate testing & more.
> > > Download & eval WebKing and get a free book.
> > > www.parasoft.com/bulletproofapps1
> > > _______________________________________________
> > > Gamedevlists-general mailing list
> > > Gam...@li...
> > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
> > > Archives:
> > > http://sourceforge.net/mailarchive/forum.php?forum_id=557
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Parasoft
> > Error proof Web apps, automate testing & more.
> > Download & eval WebKing and get a free book.
> > www.parasoft.com/bulletproofapps1
> > _______________________________________________
> > Gamedevlists-general mailing list
> > Gam...@li...
> > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
> > Archives:
> > http://sourceforge.net/mailarchive/forum.php?forum_id=557
> >
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a
> single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual
> machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> Gamedevlists-general mailing list
> Gam...@li...
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_id=557
>
|