Author | Message | Time |
---|---|---|
Grok | My diagnostic log file entries are looking pretty nice so decided to share. Whenever I enter/exit a function, I increment +1/-1 the indention level. All logging entries are done at the indent level parameter. [quote] 14:25:52 ---------------------------------------------- 14:25:52 WIKBatchRelease.DLL loaded. 14:25:52 KfxReleaseScript::Class_Initialize() {} 14:25:52 ReleaseScript::OpenScript() { 14:25:52 CustomProperties("KeyfileServer") = 'SERVER' 14:25:52 CustomProperties("KeyfileUser") = 'SUPER' 14:25:52 CustomProperties("KeyfilePassword") = '******' 14:25:52 CustomProperties("ContainerObjId") = 'SERVER.24DM63J.0G9VG2L' 14:25:52 Connecting to Keyfile ... 14:25:52 Connected. 14:25:52 return (0) 14:25:52 } 14:25:54 ReleaseScript::ReleaseDoc() { 14:25:54 Forced error for diagnostic purposes. 14:25:54 return (-1) 14:25:54 } 14:25:54 ReleaseScript::ReleaseDoc() { 14:25:54 Forced error for diagnostic purposes. 14:25:54 return (-1) 14:25:54 } 14:25:54 ReleaseScript::ReleaseDoc() { 14:25:54 Forced error for diagnostic purposes. 14:25:54 return (-1) 14:25:54 } 14:25:54 ReleaseScript::ReleaseDoc() { 14:25:54 Forced error for diagnostic purposes. 14:25:54 return (-1) 14:25:54 } 14:25:54 ReleaseScript::ReleaseDoc() { 14:25:54 Forced error for diagnostic purposes. 14:25:54 return (-1) 14:25:54 } 14:25:54 ReleaseScript::CloseScript() { 14:25:54 return (0) 14:25:54 } 14:25:54 KfxReleaseScript::Class_Terminate() {} [/quote] In a more complex program involving nested function calls, this makes it very easy to figure out the call stack and error conditions. | August 9, 2004, 6:30 PM |
iago | Very nice. I had something very similar for my Starcraft plugin. | August 9, 2004, 8:17 PM |
St0rm.iD | did you do that with AOP, or manually? | August 9, 2004, 8:59 PM |