Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into 'master'
[commhistory-daemon] Avoid locale specific numbers in debug output. Contributes to MER#1536

Minor detail as debug needs to be explicitly turned on. Can be tested by running
LC_ALL=mr_IN.utf8 commhistoryd -d
-> journal gets a few lines 

@mvogt 

See merge request !17
  • Loading branch information
pvuorela committed Mar 4, 2016
2 parents 4ef6b71 + 0f051c1 commit 6bd177f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.cpp
Expand Up @@ -26,6 +26,8 @@
#include <syslog.h>
#include <unistd.h>

#include <QLocale>

// Our includes
#include <TelepathyQt/Debug>
#include "logger.h"
Expand Down Expand Up @@ -85,7 +87,7 @@ void messageHandler(QtMsgType type, const QMessageLogContext &, const QString &m
const QByteArray &msgData(message.toLocal8Bit());
const char *msg = msgData.constData();

QByteArray timestamp = QDateTime::currentDateTime().toString("ss:zzz").toLocal8Bit();
QByteArray timestamp = QLocale::c().toString(QDateTime::currentDateTime(), "ss:zzz").toLocal8Bit();
syslog(LOG_MAKEPRI(LOG_USER, priority),
"%s [%s] %s",
logLevel,
Expand Down

0 comments on commit 6bd177f

Please sign in to comment.