summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-03-10 17:08:06 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-03-10 17:08:06 +0100
commitb798e84abdbdfcf330475da675ad3287a3b79daa (patch)
tree86c59b8f212c4c4d7d85bec84363d8d2ca9567d0 /src
parent3e5a7859cccf49acbb0bdd3ca841545e5ab0f4c5 (diff)
downloadabrt-b798e84abdbdfcf330475da675ad3287a3b79daa.tar.gz
abrt-b798e84abdbdfcf330475da675ad3287a3b79daa.tar.xz
abrt-b798e84abdbdfcf330475da675ad3287a3b79daa.zip
make report_Logger configurable
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/daemon/abrt_event.conf15
-rw-r--r--src/plugins/Makefile.am3
-rw-r--r--src/plugins/abrt-action-print.c8
-rw-r--r--src/plugins/ccpp_events.conf1
-rw-r--r--src/plugins/report_Logger.conf1
5 files changed, 15 insertions, 13 deletions
diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
index 45d8e9a4..191782c1 100644
--- a/src/daemon/abrt_event.conf
+++ b/src/daemon/abrt_event.conf
@@ -16,9 +16,6 @@
# Rule of the form "include GLOB_PATTERN" recurses to each file which matches
# GLOB_PATTERN. Example: "include post-create.d/*.conf"
#
-
-include events.d/*.conf
-
# Any other rules specify which programs to run on the crash dump.
#
# Each rule may have conditions to be checked before the program is run.
@@ -42,18 +39,25 @@ include events.d/*.conf
# If the program terminates successfully, next rule is read
# and processed. This process is repeated until the end of this file.
-# abrt-action-analyze-c needs package name, save package data first
+# abrt-action-analyze-c needs package name, save package data
+# before include directive
EVENT=post-create abrt-action-save-package-data
+
+include events.d/*.conf
+
EVENT=post-create getent passwd "`cat uid`" | cut -d: -f1 >username
EVENT=post-create analyzer=Python abrt-action-analyze-python
EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
+
# If you want all users (not just root) to be able to see oopses:
#EVENT=post-create analyzer=Kerneloops echo 1 >inform_all_users
+
# If you want behavior similar to one provided by kerneloops daemon
# distributed by kerneloops.org - that is, if you want
# oopses to be reported automatically and immediately without
# user interaction, uncomment this line:
#EVENT=post-create analyzer=Kerneloops abrt-action-kerneloops
+
# Example: if you want to save sosreport immediately at the moment of a crash:
#EVENT=post-create
nice sosreport --tmp-dir "$DUMP_DIR" --batch \
@@ -69,6 +73,7 @@ EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
true
} 2>/dev/null
+
EVENT=report analyzer=Kerneloops abrt-action-kerneloops
EVENT=report_Bugzilla analyzer=Python abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
-EVENT=report_Logger analyzer=Python abrt-action-print -o /var/log/abrt.log
+EVENT=report_Logger abrt-action-print -o "${Log_File:-/var/log/abrt.log}"
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 28a5504f..86788e8c 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -42,7 +42,8 @@ eventsdir = $(EVENTS_DIR)
dist_events_DATA = \
report_Bugzilla.xml \
- report_Bugzilla.conf
+ report_Bugzilla.conf \
+ report_Logger.conf
eventsconfdir = $(EVENTS_CONF_DIR)
diff --git a/src/plugins/abrt-action-print.c b/src/plugins/abrt-action-print.c
index cc7fbb34..a5d7219b 100644
--- a/src/plugins/abrt-action-print.c
+++ b/src/plugins/abrt-action-print.c
@@ -56,12 +56,8 @@ int main(int argc, char **argv)
putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose));
//msg_prefix = PROGNAME;
- char *env = getenv("Logger_LogPath");
- VERB3 log("output_file:'%s' Logger_LogPath env:'%s'", output_file, env);
- if (env)
- output_file = env;
-
- env = getenv("Logger_AppendLogs");
+//TODO: convert to an option:
+ char *env = getenv("Logger_AppendLogs");
VERB3 log("Logger_AppendLogs env:'%s'", env);
if (env && string_to_bool(env))
open_mode = "a";
diff --git a/src/plugins/ccpp_events.conf b/src/plugins/ccpp_events.conf
index cbeb8acf..b9f3d9ab 100644
--- a/src/plugins/ccpp_events.conf
+++ b/src/plugins/ccpp_events.conf
@@ -16,4 +16,3 @@ EVENT=reanalyze_Local analyzer=CCpp abrt-action-generate-backtrace
EVENT=reanalyze_RetraceServer analyzer=CCpp abrt-retrace-client batch -k --dir "$DUMP_DIR"
EVENT=report_Bugzilla analyzer=CCpp abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
-EVENT=report_Logger analyzer=CCpp abrt-action-print -o /var/log/abrt.log
diff --git a/src/plugins/report_Logger.conf b/src/plugins/report_Logger.conf
new file mode 100644
index 00000000..3d23c739
--- /dev/null
+++ b/src/plugins/report_Logger.conf
@@ -0,0 +1 @@
+Log_File=/var/log/abrt.log