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 } |