Commit 933b441a authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/app/logger/Logger): supports ms

parent 9830b784
......@@ -61,6 +61,12 @@ Logger *Logger::mInstance = nullptr;
// -----------------------------------------------------------------------------
inline QByteArray getFormattedCurrentTime () {
return QDateTime::currentDateTime().toString("HH:mm:ss:zzz").toLocal8Bit();
}
// -----------------------------------------------------------------------------
static void linphoneLog (const char *domain, OrtpLogLevel type, const char *fmt, va_list args) {
const char *format;
......@@ -79,7 +85,7 @@ static void linphoneLog (const char *domain, OrtpLogLevel type, const char *fmt,
else
return;
QByteArray dateTime = QDateTime::currentDateTime().toString("HH:mm:ss").toLocal8Bit();
QByteArray dateTime = getFormattedCurrentTime();
char *msg = bctbx_strdup_vprintf(fmt, args);
fprintf(stderr, format, dateTime.constData(), domain, msg);
......@@ -134,7 +140,7 @@ void Logger::log (QtMsgType type, const QMessageLogContext &context, const QStri
#endif // ifdef QT_MESSAGELOGCONTEXT
QByteArray localMsg = msg.toLocal8Bit();
QByteArray dateTime = QDateTime::currentDateTime().toString("HH:mm:ss").toLocal8Bit();
QByteArray dateTime = getFormattedCurrentTime();
mMutex.lock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment