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 »

Hello! I need to disable logging in ogre.log. Is there any way to do
it (version Ogre 1.8.1)?
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Re: Disable recording in the Log File

Post by syedhs »

Code: Select all

LogManager::getSingleton().setLogDetail(static_cast<LoggingLevel>(0));
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 »

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?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Disable recording in the Log File

Post by dark_sylinc »

Just pass an empty string when creating Root:

Code: Select all

Ogre::String logFileName = "";
OGRE_NEW Ogre::Root( "plugins.cfg", "ogre.cfg", logFileName );
Victor
Gnoblar
Posts: 7
Joined: Wed Dec 11, 2013 1:19 pm

Re: Disable recording in the Log File

Post by Victor »

Thank you so much. Everything works as it should.
Post Reply