Log modified copy instead of original message.

Signed-off-by: Shane Lawrence <shane@lawrence.dev>
This commit is contained in:
Shane Lawrence
2020-06-03 21:09:14 -04:00
committed by poiana
parent 578ef7f64d
commit 00884ef581

View File

@@ -134,7 +134,7 @@ void falco_logger::log(int priority, const string msg)
if(gtm != NULL && if(gtm != NULL &&
(strftime(buf, sizeof(buf), "%FT%T%z", gtm) != 0)) (strftime(buf, sizeof(buf), "%FT%T%z", gtm) != 0))
{ {
fprintf(stderr, "%s: %s", buf, msg.c_str()); fprintf(stderr, "%s: %s", buf, copy.c_str());
} }
} }
else else
@@ -151,7 +151,7 @@ void falco_logger::log(int priority, const string msg)
{ {
tstr = "N/A"; tstr = "N/A";
} }
fprintf(stderr, "%s: %s", tstr.c_str(), msg.c_str()); fprintf(stderr, "%s: %s", tstr.c_str(), copy.c_str());
} }
} }
} }