116 // log() interface - format the argument list and add the resulting string to |
116 // log() interface - format the argument list and add the resulting string to |
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 g_win->addMessage (msg); |
121 |
|
122 if (g_win) |
|
123 g_win->addMessage (msg); |
122 |
124 |
123 // Also print it to stdout |
125 // Also print it to stdout |
124 print ("%1\n", msg); |
126 fprint (stdout, "%1", msg); |
125 } |
127 } |