Skip to content

Commit

Permalink
Add file and lineno if compiled in Debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed May 18, 2024
1 parent 1e613b9 commit 425b0e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daemon/src/harbour-amazfish-daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
{
QByteArray localMsg = msg.toLocal8Bit();
const char* time = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz").toLocal8Bit();
#ifdef QT_MESSAGELOGCONTEXT
fprintf(stderr,"%s %s:%d: %s\n", time, context.file, context.line, localMsg.constData());
#else
fprintf(stderr, "%s : %s\n", time, localMsg.constData());
#endif
}

int main(int argc, char **argv)
Expand Down

0 comments on commit 425b0e1

Please sign in to comment.