Blob Blame History Raw
From 5ac45a9f799a83e8e7756fbb613adc0e7570a1a5 Mon Sep 17 00:00:00 2001
From: Gregory Collins <greg@gregorycollins.net>
Date: Wed, 21 Jan 2015 04:38:58 +0100
Subject: [PATCH] Rewrite journalctl invocations: replace grep/tail pipeline
 with journalctl builtins.

---
 src/plugins/ccpp_event.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/ccpp_event.conf b/src/plugins/ccpp_event.conf
index 985e80d..894c7eb 100644
--- a/src/plugins/ccpp_event.conf
+++ b/src/plugins/ccpp_event.conf
@@ -38,9 +38,9 @@ EVENT=post-create analyzer=CCpp
             else
                 uid=`cat uid` &&
                 log="[System Logs]:\n" &&
-                log=$log`journalctl -b --since=-3m --system | grep -F -e "$base_executable" | tail -99` &&
+                log=$log`journalctl -b --since=-3m --system -n 99 _COMM="$base_executable"` &&
                 log=$log"\n[User Logs]:\n" &&
-                log=$log`journalctl _UID="$uid" -b --since=-3m | grep -F -e "$base_executable" | tail -99` &&
+                log=$log`journalctl -b --since=-3m -n 99 _COMM="$base_executable" _UID="$uid"` &&
                 log=`echo -e "$log"`
             fi
             if test -n "$log"; then
-- 
1.9.3