Commit b1e8f08e authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

save server output to a file

parent ce4f8e20
...@@ -22,8 +22,19 @@ ...@@ -22,8 +22,19 @@
#include <QTextCodec> #include <QTextCodec>
#include "servatrice.h" #include "servatrice.h"
void myMessageOutput(QtMsgType /*type*/, const char *msg)
{
static FILE *f = NULL;
if (!f)
f = fopen("qdebug.txt", "w");
fprintf(f, "%s\n", msg);
fflush(f);
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
qInstallMsgHandler(myMessageOutput);
QCoreApplication app(argc, argv); QCoreApplication app(argc, argv);
app.setOrganizationName("Cockatrice"); app.setOrganizationName("Cockatrice");
app.setApplicationName("Servatrice"); app.setApplicationName("Servatrice");
......
Supports Markdown
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