src/messagelog.cpp

changeset 514
d78fea0f664c
parent 513
29eb671b34f6
child 527
47c068f2e7e3
equal deleted inserted replaced
513:29eb671b34f6 514:d78fea0f664c
117 // the main message manager. 117 // the main message manager.
118 // ----------------------------------------------------------------------------- 118 // -----------------------------------------------------------------------------
119 void DoLog (std::initializer_list<StringFormatArg> args) 119 void DoLog (std::initializer_list<StringFormatArg> args)
120 { const str msg = DoFormat (args); 120 { const str msg = DoFormat (args);
121 121
122 if (g_win) 122 for (str& a : msg.split ("\n", QString::SkipEmptyParts))
123 g_win->addMessage (msg); 123 { if (g_win)
124 g_win->addMessage (a);
124 125
125 // Also print it to stdout 126 // Also print it to stdout
126 fprint (stdout, "%1", msg); 127 fprint (stdout, "%1\n", a);
128 }
127 } 129 }

mercurial