#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   // Pattern: Match "Log:", an optional level (Warning or Error), and the message.
   // Replacement: Use `{!level:OK}` to insert 'OK' if no level was captured.
   t.FromTo("Log: [{level: Warning | Error}] {msg}", "Status: {!level:OK}{level} | Message: {msg}");

   cout << t.Transform("Log: This is a standard entry") << endl;
   cout << t.Transform("Log: Warning A potential issue was found") << endl;
   cout << t.Transform("Log: Error System failure detected") << endl;
}