Disable recording in the Log File

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Victor
Gnoblar
Posts: 7
Joined: Wed Dec 11, 2013 1:19 pm

Disable recording in the Log File

Post by Victor » Wed Sep 02, 2015 2:41 pm

Hello! I need to disable logging in ogre.log. Is there any way to do
it (version Ogre 1.8.1)?
0 x

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 3

Re: Disable recording in the Log File

Post by syedhs » Wed Sep 02, 2015 2:55 pm

Code: Select all

LogManager::getSingleton().setLogDetail(static_cast<LoggingLevel>(0));
0 x
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me

Victor
Gnoblar
Posts: 7
Joined: Wed Dec 11, 2013 1:19 pm

Re: Disable recording in the Log File

Post by Victor » Thu Sep 03, 2015 1:00 pm

Where is it necessary to insert?
If you put it in front of Root, the application hangs and if you put it after Root, the file creates.
How can I avoid the creation of a file?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4138
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 268
Contact:

Re: Disable recording in the Log File

Post by dark_sylinc » Thu Sep 03, 2015 7:42 pm

Just pass an empty string when creating Root:

Code: Select all

Ogre::String logFileName = "";
OGRE_NEW Ogre::Root( "plugins.cfg", "ogre.cfg", logFileName );
0 x

Victor
Gnoblar
Posts: 7
Joined: Wed Dec 11, 2013 1:19 pm

Re: Disable recording in the Log File

Post by Victor » Fri Sep 04, 2015 6:36 pm

Thank you so much. Everything works as it should.
0 x

Post Reply