34 #include <stdio.h> |
34 #include <stdio.h> |
35 #include <stdlib.h> |
35 #include <stdlib.h> |
36 #include <e32debug.h> |
36 #include <e32debug.h> |
37 |
37 |
38 #ifdef TRACE_FILE |
38 #ifdef TRACE_FILE |
39 #define _TRACE_FILENAME "c:/trace.txt" |
39 #ifndef TRACE_FILENAME |
|
40 #define TRACE_FILENAME "c:/trace.txt" |
|
41 #endif |
40 #define _TX_INIT void __tx_myMessageOutput(QtMsgType type, const char *msg) {\ |
42 #define _TX_INIT void __tx_myMessageOutput(QtMsgType type, const char *msg) {\ |
41 static const QString timeFmt("hh:mm:ss.zzz");\ |
43 static const QString timeFmt("hh:mm:ss.zzz");\ |
42 FILE *f = fopen(_TRACE_FILENAME, "a");\ |
44 FILE *f = fopen(TRACE_FILENAME, "a");\ |
43 fprintf(f, "%s ", QTime::currentTime().toString(timeFmt).toLatin1().data() );\ |
45 fprintf(f, "%s ", QTime::currentTime().toString(timeFmt).toLatin1().data() );\ |
44 switch (type) {\ |
46 switch (type) {\ |
45 case QtDebugMsg: fprintf(f, "[DEB] [TX] %s\n", msg); break;\ |
47 case QtDebugMsg: fprintf(f, "[DEB] [TX] %s\n", msg); break;\ |
46 case QtWarningMsg: fprintf(f, "[WRN] [TX] %s\n", msg); break;\ |
48 case QtWarningMsg: fprintf(f, "[WRN] [TX] %s\n", msg); break;\ |
47 case QtCriticalMsg: fprintf(f, "[CRT] [TX] %s\n", msg); break;\ |
49 case QtCriticalMsg: fprintf(f, "[CRT] [TX] %s\n", msg); break;\ |