Tuesday 11 August 2009

Logging and Locking up Issues

I've noticed that occasionally Kharne locks up, which I think is due to an infinite loop condition somewhere. I've been unsuccessful in tracking down the exact problem, so to aid finding and correcting this problem, the next version will have logging added. I'm using Oliver Touzot's THotLog component which as well as being freeware, has all the functionality I need.

Not only do I intend to log errors and exceptions, I also intend to log, as much as possible, the complete execution of the program as well.

So far, I've only converted a couple of source code units to use Logging, but there is some sample output below. This will be written to a log file in the same directory as KHARNE.EXE.

2009-08-11 00:01:44 1 TVault.Create(1, 'Round')
2009-08-11 00:01:44 2 TVault.Create(2, 'Octagon')
2009-08-11 00:01:44 3 TVault.Create(3, 'Square')
2009-08-11 00:01:44 4 TVault.Create(4, 'Open')
2009-08-11 00:01:44 5 TVault.Create(5, 'Lesser Cell')
2009-08-11 00:01:44 6 TVault.Create(6, 'Left Diagonal')
2009-08-11 00:01:44 7 TVault.Create(7, 'Right Diagonal')
2009-08-11 00:01:44 8 TVault.Create(8, 'Octagon')
2009-08-11 00:01:44 9 TVault.Create(9, 'Rooms')
2009-08-11 00:01:44 10 TVault.Create(10, 'Central')
2009-08-11 00:01:44 11 TVault.Create(11, 'Intermeshed')
2009-08-11 00:01:44 12 TVault.Create(12, 'Turns')
2009-08-11 00:01:44 13 TVault.Create(13, 'Tiny')
2009-08-11 00:01:45 14 TVault.Create(14, 'Small Entry')
2009-08-11 00:01:45 15 TVault.Create(15, 'Small')
2009-08-11 00:01:45 16 TVault.Create(16, 'Long Pit')
2009-08-11 00:01:45 17 TVault.Create(17, 'Entry')
2009-08-11 00:01:51 18 UnitVault.GetRandomVault(0, 0)
2009-08-11 00:01:51 19 TVault.GetVaultMap()
2009-08-11 00:01:51 20 UnitVault.GetEntryVault()
2009-08-11 00:01:51 21 TVault.GetVaultMap()

Adding logging such as this is another task I need to do before I MPL the source code.

No comments: