diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-10 00:10:22 +0100 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-10 00:10:22 +0100 |
| commit | 9d2cb4518c3a8a72ccc714ddbc131aaa84506092 (patch) | |
| tree | e21efa47e3ed2e2f911c87fad8d0d992f236124a /src/daemon/abrt-action-print.cpp | |
| parent | d1c6a4329284a1daba12a7e0fbd743a90cb0d884 (diff) | |
| download | abrt-9d2cb4518c3a8a72ccc714ddbc131aaa84506092.tar.gz abrt-9d2cb4518c3a8a72ccc714ddbc131aaa84506092.tar.xz abrt-9d2cb4518c3a8a72ccc714ddbc131aaa84506092.zip | |
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 <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon/abrt-action-print.cpp')
| -rw-r--r-- | src/daemon/abrt-action-print.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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)) |
