public static function createLogHandler(string $logLevel = LogLevel::DEBUG, bool $bubble = false): HandlerInterface
    {
        if (!self::isWorker()) {
            throw new \Error(__FUNCTION__ . " should only be called when running as a worker. " .
                "Create your own log handler when not running as part of a cluster");
        }

        return new Internal\IpcLogHandler(self::$client, $logLevel, $bubble);
    }
public static function createLogHandler(string $logLevel = LogLevel::DEBUG, bool $bubble = false): HandlerInterface
    {
        if (!self::isWorker()) {
            throw new \Error(__FUNCTION__ . " should only be called when running as a worker. " .
                "Create your own log handler when not running as part of a cluster");
        }

        return new Internal\IpcLogHandler(self::$client, $logLevel, $bubble);
    }
public static function createLogHandler ( string $ logLevel = LogLevel :: DEBUG , bool $ bubble = false ) : HandlerInterface { if ( ! self :: isWorker ( ) ) { throw new \ Error ( __FUNCTION__ . " should only be called when running as a worker. " . "Create your own log handler when not running as part of a cluster" ) ; } return new Internal \ IpcLogHandler ( self :: $ client , $ logLevel , $ bubble ) ; }
Creates a log handler in worker processes that communicates log messages to the parent.

@param string $logLevel Log level for the IPC handler
@param bool   $bubble   Bubble flag for the IPC handler

@return HandlerInterface

@throws \Error Thrown if not running as a worker.
Creates a log handler in worker processes that communicates log messages to the parent .