XF 2.2 Using DebugMode for IF/ELSE

mcatze

Well-known member
I have a logging routine and want to log just when debug mode is enabled. I have tried to use..
PHP:
if(\XF::$debugMode)
{
    //Logroutine
}
..but is doesn't work. I also found $this->assertDebugMode() but i can't call these method.

Is there another way to ask for debug mode?
 
Code:
\XF::$debugMode
is the correct thing to check. Note however, that it is different from development mode, which is checked with \XF::$developmentMode.
 
Back
Top Bottom