D-Bus server: preserve log prefix

The log prefix seems to be unused (except for some debug message) at
the moment but will be soon, so make sure it gets embedded in the
string sent to the syncevo-dbus-server.
This commit is contained in:
Patrick Ohly 2014-08-22 15:05:42 +02:00
parent ff35aa5ace
commit 045bf7aa5b
2 changed files with 7 additions and 1 deletions

View File

@ -109,6 +109,12 @@ public:
options.m_level <= m_dbusLogLevel) {
// send to parent
string log = StringPrintfV(format, args);
if (options.m_prefix) {
std::string prefix = *options.m_prefix;
prefix += ": ";
boost::replace_all(log, "\n", prefix);
log.insert(0, prefix);
}
string strLevel = Logger::levelToStr(options.m_level);
try {
m_helper->emitLogOutput(strLevel, log, options.m_processName ? *options.m_processName : getProcessName());

View File

@ -9555,7 +9555,7 @@ class TestHTTP(CmdlineUtil, unittest.TestCase):
# This may happen without ever having to enter our threading
# code, so we can't check for its 'background thread completed'
# message. Instead check that the file source continued normally.
self.assertIn('continue opening file source', self.messages)
self.assertIn('addressbook-slow-server: continue opening file source', self.messages)
# Finally, also check server session status.
status, error, sources = self.session.GetStatus()