Add output redirection in release mode.
Debug mode gets outputted to std{out,err}. While most IDEs are sane enough to capture the streams by default (hello, Qt Creator!), others aren't (such as CLion, but there's a workaround there), and you can forget about CMD output as well. Ugh, I hate Windows...
This commit is contained in:
parent
61d1e3635f
commit
b0affadd9a
1 changed files with 14 additions and 1 deletions
15
src/main.cpp
15
src/main.cpp
|
@ -16,4 +16,17 @@
|
|||
|
||||
#include "SaveTool/SaveTool.h"
|
||||
|
||||
MAGNUM_SDL2APPLICATION_MAIN(SaveTool)
|
||||
#include <fstream>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
#ifndef MANAGER_DEBUG_BUILD
|
||||
std::ofstream output{"out.txt", std::ios::trunc|std::ios::out};
|
||||
|
||||
Utility::Debug d{&output};
|
||||
Utility::Warning w{&output};
|
||||
Utility::Error e{&output};
|
||||
#endif
|
||||
|
||||
SaveTool app({argc, argv});
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue