Trying to Assert More Control Over a Wayward Application
Today I spent most of the day trying to check the fix I made yesterday afternoon. I believe it's right, as I've stepped through the code and I can't see why it might be wrong, but I wanted the users to check the data. I was very hard to get them to verify the data.
The primary problem was that the data is sampled from one system, pushed into another system and then shown in a client. It's a bit of a travel, and the question is: How old is this data?
The problem I kept running into was that I could not prove the data right because there was much I could not tell about the processing. The original developer used Aspect logging, and while that did what he wanted (kept the logging out of the processing code), it meant that there were limitations on the logging because of that same fact.
I decided that it had to change, and started putting in the logging at all levels of the application so that when I was done, there would be one log file that would tell me:
- what machine gathered the data for the server (by hostname or IP address)
- what type of request was done
- when it was sent to the extraction process and how long he took
- time required to parse the packet received at the server
- time required to incorporate the data in the packet
- total time from start of grab to the successful incorporation of the data
This is the kind of logging this application needs to have. It's got to mean something and be useful.
In a way, I'm a little glad. After thinning out the old Aspect logging, it's starting to look like something I might have done from the start. I can quantify the delays so that I can tell the users exactly what they are seeing. It's a much better place to be.
They may not like it, but that's a different issue.