summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-07-14 15:35:58 +0200
committerKarel Klic <kklic@redhat.com>2010-07-14 15:37:25 +0200
commit6d0f92b88d173bb1aad32397536c2e3167ae904a (patch)
tree4adc1df60f87aa47c08f155b72bc93bea03d2205
parent8fcc494c4fbea1eda95e30b9039275aa21768dd9 (diff)
downloadabrt-6d0f92b88d173bb1aad32397536c2e3167ae904a.tar.gz
abrt-6d0f92b88d173bb1aad32397536c2e3167ae904a.tar.xz
abrt-6d0f92b88d173bb1aad32397536c2e3167ae904a.zip
The Logger plugin returns a message as the result of Report() call instead of a file URL.
-rw-r--r--lib/Plugins/Logger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index c8f00a3c..bb593ddc 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -65,8 +65,8 @@ std::string CLogger::Report(const map_crash_data_t& pCrashData,
/* open, not fopen - want to set mode if we create the file, not just open */
const char *fname = m_sLogPath.c_str();
int fd = open(fname,
- m_bAppendLogs ? O_WRONLY|O_CREAT|O_APPEND : O_WRONLY|O_CREAT|O_TRUNC,
- 0600);
+ m_bAppendLogs ? O_WRONLY|O_CREAT|O_APPEND : O_WRONLY|O_CREAT|O_TRUNC,
+ 0600);
if (fd < 0)
throw CABRTException(EXCEP_PLUGIN, "Can't open '%s'", fname);
@@ -76,7 +76,8 @@ std::string CLogger::Report(const map_crash_data_t& pCrashData,
full_write(fd, desc, strlen(desc));
close(fd);
- return "file://" + m_sLogPath;
+ const char *format = m_bAppendLogs ? _("The report was appended to %s") : _("The report was stored to %s");
+ return ssprintf(format, m_sLogPath.c_str());
}
PLUGIN_INFO(REPORTER,