Jump to content

[SOLVED] Disabling Engine couts


njord
 Share

Recommended Posts

Hello everyone. As you know there are lots of messages that the LE engine prints out such as :

 

"Loading texture "e:/workspace/iss/out/data/ig/leadwerksrenderer/materials/custom/clouds/cloud7.dds"..." etc.

 

Is there any LE or C++ or Visual Studio way to disable these couts of engine.dll ?

 

These messages really make it hard for us to see our own debug print outs.

 

Thanks in advance.

Link to comment
Share on other sites

I don't think there is a way to do that, but you can build your project as a win32 application ( you need some special files for it) and create your own console. This is very easy, you just create a Window with a listbox and add your debug informations there.

 

post-2191-0-89451200-1354789947_thumb.jpg

Here is my solution.On the left is the debug box and on the right you see the variables and the values.You can insert references to each type of variable in the manager ( you see it doesn't work very well, because the listbox sometimes get one entry twice)

Link to comment
Share on other sites

AppLogMode(0) disables all the engine logs, and you can still use use printf() to print your own debug messages:

#include "engine.h"
int main()
{
   Initialize();
   AppLogMode(0);
   Graphics();
   CreateFramework();
   CreateSpotLight();
   BP cube=CreateCube();
   MoveEntity(cube,Vec3(0,0,5));
   double n;
   while(1)
   {
       UpdateFramework();
       if(KeyHit(KEY_A))printf("**** My Debug Message ****\n");
       if(KeyHit(KEY_ESCAPE))break;
       n=AppSpeed();
       TurnEntity(cube,Vec3(1*n,2*n,3*n));
       RenderFramework();
       Flip(0);
   }
   return Terminate();
}

  • Upvote 1

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

It disables creating the engine.log file and also any output into the engine.log and to stdout from the engine itself. But it doesn't disable stdout from C++.

 

You can compile my example with mingw64 using:

g++ main.cpp -Ic:\prg\le\cpp c:\prg\le\cpp\engine.cpp -O6 -static -m32 -o main.exe

to see it yourself.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...