Commit 12c53b2c authored by cutealien's avatar cutealien

Allow to set the logging level already in SIrrlichtCreationParameters.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3059 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 633702e2
......@@ -8,6 +8,7 @@
#include "EDriverTypes.h"
#include "EDeviceTypes.h"
#include "dimension2d.h"
#include "ILogger.h"
namespace irr
{
......@@ -35,6 +36,7 @@ namespace irr
HighPrecisionFPU(false),
EventReceiver(0),
WindowId(0),
LoggingLevel(ELL_INFORMATION),
SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
{
}
......@@ -61,6 +63,7 @@ namespace irr
HighPrecisionFPU = other.HighPrecisionFPU;
EventReceiver = other.EventReceiver;
WindowId = other.WindowId;
LoggingLevel = other.LoggingLevel;
return *this;
}
......@@ -228,6 +231,14 @@ namespace irr
do it how you like. */
void* WindowId;
//! Specifies the logging level used in the logging interface.
/** The default value is ELL_INFORMATION. You can access the ILogger interface
later on from the IrrlichtDevice with getLogger() and set another level.
But if you need more or less logging information already from device creation,
then you have to change it here.
*/
ELOG_LEVEL LoggingLevel;
//! Don't use or change this parameter.
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
This is needed for sdk version checks. */
......
......@@ -34,6 +34,7 @@ CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params)
Logger = new CLogger(UserReceiver);
os::Printer::Logger = Logger;
}
Logger->setLogLevel( CreationParams.LoggingLevel );
os::Printer::Logger = Logger;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment