Instead of creating a complete program to analyze the PFSense(tm) log files I found it more convenient for my needs to create a small library of objects able to interpret the log entries and from there allow the manipulation of this data. This is not a generic library and has not been tested in environments other than the one used in its development.
PFLogentry was coded entirely in C++.
As I consider QtCreator(tm) to be an excellent development environment,
I use it for my projects, even if these don't directly involve using the Qt(tm) tools.
- At least C++17.
- Boost
- tinyxml2-7.0.1
- Fedora 35
- clang (clang++) version 13.0.0
- g++ (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
(Under Oracle Linux 8 install gcc-devtool-10 or 8.5 install gcc-devtool-11) - cmake version 3.22.0
- QtCreator 6.0.x (Code Style: clang-format -style=Mozilla)
- Loads entire log file into memory;
- Check that the log entries are with the correct format;
- Allows counting of log entries given a condition.
For example:
cnt->count(PFLogentry::HdrDay).betweenAND(20,30);
Returns the total of entries read that are between the 20th and the 30th inclusive. - Allows query of log entries given a condition.
- Allows the summarization of information from log entries generating reports.
- Allows export of log entries to a XML file format.