From 9d2cb4518c3a8a72ccc714ddbc131aaa84506092 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 10 Nov 2010 00:10:22 +0100 Subject: Decouple settings handling from old-style plugins The breakage was discovered when i removed Logger class. it turned out the fix is somewhat involved. This change implements it as discussed with the rest of the team. Signed-off-by: Denys Vlasenko --- src/daemon/abrt-action-print.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/daemon/abrt-action-print.cpp') diff --git a/src/daemon/abrt-action-print.cpp b/src/daemon/abrt-action-print.cpp index 437387e1..a4db373a 100644 --- a/src/daemon/abrt-action-print.cpp +++ b/src/daemon/abrt-action-print.cpp @@ -53,18 +53,21 @@ int main(int argc, char **argv) OPT_END() }; + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage); + + 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"); + VERB3 log("Logger_AppendLogs env:'%s'", env); if (env && string_to_bool(env)) open_mode = "a"; - /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage); - - putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - if (output_file) { if (!freopen(output_file, open_mode, stdout)) -- cgit