Hi all,

On Do, 2016-11-10 at 22:09 +0100, Thomas Liske wrote:

(...)

> this is a negative lookbehind assertion - quoting from perlre(1):

(...)

Afaics, the hardcoded default value for err-pattern falsely uses HTML
entities. These are needed in the XML config obviously, but not in
getXPropStr() default value argument.

With this patch, the default "err-pattern" works for me:

---
$ absurd? cat debian/patches/02-fix-default-err-pattern.patch 
diff --git a/src/keyfiles.c b/src/keyfiles.c
index affdb2b..2e04a6b 100644
--- a/src/keyfiles.c
+++ b/src/keyfiles.c
@@ -401,7 +401,8 @@ gboolean loadConfig(const gchar *filename, CfgFile *lcfg) {
 
 #ifdef FEAT_HISTORY
     lcfg->record_history = getXPropBool(s_history, "record", TRUE);
-    lcfg->history_errpattern = getXPropStr(s_history, "err-pattern", 
"((?<!no )error|(?<!insserv: )warning|fail(ed)?)");
+    /* lcfg->history_errpattern = getXPropStr(s_history, "err-pattern", 
"((?<!no )error|(?<!insserv: )warning|fail(ed)?)"); */
+    lcfg->history_errpattern = getXPropStr(s_history, "err-pattern", "((?<!no 
)error|(?<!insserv: )warning|fail(ed)?|^\r*(E|W): )");
     lcfg->history_dir = getXPropStr(s_path, "history-dir", 
g_strdup_printf("%s/%s/history", g_get_user_data_dir(), PACKAGE));
 #endif
---

This patch also adds patterns for "E: foo" "W: bar"-types of logs
(which I think are useful).

Hth!

S

Reply via email to