How to disable logging?
Posted: Thu Jul 24, 2008 14:08
by SalvoFa
Hi all!
How can I disable the CEGUI.log file creation?
I've a read-only filesystem and I can't let my application to write data in the filesystem!
Thank you.
Salvo
Posted: Fri Jul 25, 2008 08:43
by CrazyEddie
Hi,
Probably the simplest way is to create a custom logger subclass of CEGUI::Logger that does nothing (or whatever else you like). In order that your new logger get used instead of the default one, you must manually instantiate the new logger singleton prior to creating the CEGUI::System object.
HTH
CE.
Re: How to disable logging?
Posted: Mon Jun 15, 2009 09:56
by Toge
Include this code in your source before use CEGUI first time to disable CEGUI.log.
Code: Select all
class NoLogger : public CEGUI::Logger
{
void logEvent (const CEGUI::String&, CEGUI::LoggingLevel)
{
}
void setLogFilename(const CEGUI::String&, bool)
{
}
};
NoLogger nL;