VeTaL Posted September 10, 2010 Share Posted September 10, 2010 How can i write to Engine.log file? If i use "::OutputDebugString(Text); " , it writes to Output. If i use "printf(Text);", it writes to Console, but dont saves to Engine.log. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Canardia Posted September 10, 2010 Share Posted September 10, 2010 AppLog("Hello World!"); Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
VeTaL Posted September 10, 2010 Author Share Posted September 10, 2010 Damned, really Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
VeTaL Posted September 10, 2010 Author Share Posted September 10, 2010 And how can i write without going to the next string? I'm working on Pixel's profiler: http://leadwerks.com/werkspace/index.php?/files/file/142-profiling-code-for-c/ I edited void dumpprint(const char*Text) { ::OutputDebugString(Text); printf(Text); AppLog(Text); }; and in Output i get =========== Profile ================== d:\work\test\game\core\clevelmanager.cpp(366): 0: 1x 3.86s 3.86s 100% TestProfiler Total: 3.86s ====================================== but in log i have =========== Profile ================== d:\work\test\game\core\clevelmanager.cpp ( 366 ): 0 : 1 x 3.86 s 3.86 s 100 % TestProfiler Total: 3.86 s ====================================== Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Canardia Posted September 10, 2010 Share Posted September 10, 2010 You need to collect all strings into a total string and then AppLog(totalstring). You can probably look for the '\n' character and finish the total string when you find it. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
VeTaL Posted September 10, 2010 Author Share Posted September 10, 2010 Yep, thats solution... i just asked, if there is function, that writes to log without next string symbol. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.