#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); auto log = "WARNING: low disk. ERROR: service down. WARNING: high CPU. WARNING: queue full."; auto warningRule = t.FromTo("WARNING: {msg}.", "[WARN] {msg}."); auto errorRule = t.FromTo("ERROR: {msg}.", "[ERR] {msg}."); // Set a rule-specific limit for warnings. warningRule.Maximum(2); t.Filter(log); cout << t.Matches().Text() << endl; }