#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; auto logText = "INFO: System start. WARN: Low disk. ERROR: DB connection failed."; t.Text(logText); // Define rules for different log levels auto errorRule = t.Pattern("ERROR: {msg}."); auto warnRule = t.Pattern("WARN: {msg}."); auto infoRule = t.Pattern("INFO: {msg}."); t.Find(); cout << "--- Analysis of All Matches ---" << endl; for(auto match : t.Matches()) { // Use the match's Rule property to get the name of the rule that found it cout << "Found '" << match.Text() << "' using rule: '" << match.Rule().Name() << "'" << endl; } }