Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Watches, Counters and Split log files


#1

Hello,

We have an issue when using split log files (text) and counters in that the subsequent log files do not display all of the counters. We are using both TCP/IP logging and text based logging split by size.

For example on the Watches Panel, the Latest tab will display the following for the first log file:

Number of applications in pool - MSPublisher = 2
Number of applications in pool - MSWord = 0
Number of applications in pool - PNInternetExplorerFactory = 2
Number of in-use applications - MSWord = 3
Number of successful conversions - Microsoft Word = 90
Total documents received = 94
Total documents received for Microsoft Word = 94
Total documents to be processed = 94
Total documents to be processed for Microsoft Word = 94

The second log file, when opened, will only display the following:

Number of applications in pool - MSWord = 1
Number of in-use applications - MSWord = 2
Number of successful conversions - Microsoft Word = 182
Total documents received = 187
Total documents received for Microsoft Word = 187
Total documents to be processed = 187
Total documents to be processed for Microsoft Word = 187

We are using the IncCounter("…"), DecCounter("…") for these variables and it’s almost as if the state of the counters from the previous log file is lost when you move to the next file.

Would the Watches be a better choice for what we want to accomplish?

Ultimately we would like to see ALL of our counters (or watches if they are more appropriate in this case) in the Watches panel for each file, not just the ones that have been updated.

Thanks,

Sheri


#2

Hi Sheri,

Thanks for your posting. When you use the IncCounter and DecCounter methods, the watches are only logged when the counter changes, so the SmartInspect Console can only see watches for values that have been updated during the creation of that particular log file (as you’ve mentioned).

As the counter methods use watches internally, directly using the Watches wouldn’t make a large difference. That said, if you used Watches, you could simply log the current watches values periodically (i.e. in a background thread or via a timer). So if your typical log files last for 1hour, for example, you could simply log the watches every 10 minutes (even if the values didn’t change) and you would then see the watches values for every log file. Would this be a feasible workaround for you?

Thanks,
Dennis


#3

Dennis,

Sorry for the long delay in getting back to you.

We are successfully using your solution of a thread that logs the watch data based on a timer to update the Watches in the console.

Thanks!


#4

Hi Sheri,

Thanks for getting back to me and glad to hear that this works for you!

Regards,
Dennis