Thread: RE: [GD-General] runtime error logging
Brought to you by:
vexxed72
From: Tom F. <to...@mu...> - 2003-07-14 16:05:40
|
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 > |
From: Gareth L. <GL...@cl...> - 2003-07-16 06:46:05
|
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 > |
From: Paul B. <pa...@mi...> - 2003-07-16 15:01:20
|
I'm guessing that Tom wants to be able to shut off instances of a log message (for a 'mesh1' but not 'mesh2'). I think someone mentioned already that you hash the format string for the "class" of logs and the formatted string for the "instance" of logs. =20 I'm not sure why you would hash only the strings in quotes. If you have multiple classes of messages that each used 'mesh1' as the only param then you'd potentially ignore both by just hashing the params. Paul > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Gareth Lewin > Sent: Wednesday, July 16, 2003 1:46 AM > To: gam...@li... > Subject: RE: [GD-General] runtime error logging >=20 > Silly questoin, but couldn't you hash the string before the=20 > params were evaluated ? So you would just hash "Unknown=20 > effect '%s' in mesh '%s'\n"=20 >=20 > > -----Original Message----- > > From: Tom Forsyth [mailto:to...@mu...] > > Sent: 14 July 2003 17:03 > > To: gam...@li... > > Subject: RE: [GD-General] runtime error logging > >=20 > >=20 > > We do three things. (1) surround high-frequency info with single=20 > > quotes. (2) hash the characters _not_ in single quotes. (3)=20 > check hash=20 > > against a list of "I've already reported that" errors. So you have: > >=20 > > LOG_ERROR ( "Unknown effect '%s' in mesh '%s'\n", sEffectName,=20 > > sMeshName ); > >=20 > > So this is a spritnf-style format string, and will come out to be=20 > > something > > like: > >=20 > > Unknown effect 'WATRE' in mesh 'blah.x' > > Unknown effect 'WATRE' in mesh 'blah2.x' > > Unknown effect 'WATRE' in mesh 'blah3.x' > >=20 > > ...so then we remove everything in single quotes: > >=20 > > Unknown effect in mesh > > Unknown effect in mesh > > Unknown effect in mesh > >=20 > > ...and hash those. And of course they all come out with the=20 > same hash=20 > > value and only the first one gets reported if you click on "Ignore=20 > > all" in our little dialog box. > >=20 > >=20 > > Tom Forsyth - Muckyfoot bloke and Microsoft MVP. > >=20 > > This email is the product of your deranged imagination, and=20 > does not=20 > > in any way imply existence of the author. > >=20 > > > -----Original Message----- > > > From: Andras Balogh [mailto:bn...@ma...] > > > Sent: 14 July 2003 16:41 > > > To: gam...@li... > > > Subject: [GD-General] runtime error logging > > >=20 > > >=20 > > > There are some cases when I have to deal with runtime errors that=20 > > > cannot be seen before, such as when the user executes an invalid=20 > > > script. I can handle these events, but I would also like=20 > to log them=20 > > > somewhere. The problem is that these invalid events may happen in=20 > > > every frame (or even multiple times a frame) flooding the > > log file in > > > no time... > > >=20 > > > Any ideas on how I could do "singleton" logging of errors? > > > Can't think of any simple solution :( > > >=20 > > > thanks, > > >=20 > > > Bandi > > >=20 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email sponsored by: Parasoft Error proof Web apps,=20 > > > 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=3D557 > > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email sponsored by: Parasoft Error proof Web apps,=20 > > 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=3D557 > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware With VMware you=20 > can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual=20 > machines at the same time. Free trial click here:=20 > 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=3D557 >=20 >=20 |
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 > |
From: Julien K. <ma...@ju...> - 2003-07-14 16:19:05
|
You could take the __FILE__ and __LINE__ preprocessor definitions as source for your hash-function.. (jsut an idea.. never needed something like this). greets Julien Koenen ----- Original Message ----- From: "Tom Forsyth" <to...@mu...> To: <gam...@li...> Sent: Monday, July 14, 2003 6:02 PM 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 |
From: Andras B. <bn...@ma...> - 2003-07-15 17:00:07
|
Hashing seems to be the best idea so far, so I think I'll stick with it. thanks, b Monday, July 14, 2003, 6:02:41 PM, Tom Forsyth wrote: > 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: |