diff options
author | Karel Klic <kklic@redhat.com> | 2010-07-14 15:35:58 +0200 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-07-14 15:37:25 +0200 |
commit | 6d0f92b88d173bb1aad32397536c2e3167ae904a (patch) | |
tree | 4adc1df60f87aa47c08f155b72bc93bea03d2205 /lib/Plugins | |
parent | 8fcc494c4fbea1eda95e30b9039275aa21768dd9 (diff) | |
download | abrt-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.
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/Logger.cpp | 7 |
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, |