Q
|
Can I use CountryHawk to process entries in a log file?
|
A
|
Yes. CountryHawk is designed with processing log files in mind. For each entry in the log you just pass the IP address to CountryHawk and it returns all the results instantly, without relying on any outside servers or connections.
If you are processing logs to generate statistics, you will find CountryHawk's built-in support for stats tracking very powerful. Each time you pass an IP address to CountryHawk, it automatically increments counts for the total number of requests for the country and region associated with that IP address.
This means that to tabulate statistics from a log file, all you need to do is pass CountryHawk the IP address for each entry in the log. That's it. There is no need to then keep track of the stats and results using your own logic, as the component does all that for you.
To obtain the results of the statistics, you simply enumerate the stats object which returns the totals. You can choose to reset the stats at any time, or persist them to disk so that you can continue the running tally with the next batch processing.
Note that the automated stats collection and tabulation feature described here requires the Enterprise Edition of CountryHawk.
|