public static function getLogger()
    {
        if (self::$logger === null)
        {
            try
            {
                $result = Hook::execute(
                    "Wedeto.Util.GetLogger", 
                    ["logger" => null, "class" => static::class]
                );
            }
            catch (RecursionException $e)
            {
                // Apparently the hook is calling getLogger which is failing, so
                // use an emergency logger to log anyway.
                $result = ['logger' => new EmergencyLogger];
            }

            self::$logger = $result['logger'] ?? new NullLogger();
        }
        return self::$logger;
    }
public static function getLogger()
    {
        if (self::$logger === null)
        {
            try
            {
                $result = Hook::execute(
                    "Wedeto.Util.GetLogger", 
                    ["logger" => null, "class" => static::class]
                );
            }
            catch (RecursionException $e)
            {
                // Apparently the hook is calling getLogger which is failing, so
                // use an emergency logger to log anyway.
                $result = ['logger' => new EmergencyLogger];
            }

            self::$logger = $result['logger'] ?? new NullLogger();
        }
        return self::$logger;
    }
public static function getLogger ( ) { if ( self :: $ logger === null ) { try { $ result = Hook :: execute ( "Wedeto.Util.GetLogger" , [ "logger" => null , "class" => static :: class ] ) ; } catch ( RecursionException $ e ) { // Apparently the hook is calling getLogger which is failing, so // use an emergency logger to log anyway. $ result = [ 'logger' => new EmergencyLogger ] ; } self :: $ logger = $ result [ 'logger' ] ?? new NullLogger ( ) ; } return self :: $ logger ; }
Get a logger. If not available yet, it will be created using a Hook, or
a NullLogger is instantiated.
Get a logger . If not available yet it will be created using a Hook or a NullLogger is instantiated .