private function dispatch($message, $context)
    {
        $output = $this->interpolate($message, $context) . PHP_EOL;

        if ($this->getOption('outputToFile') === true) {
            $file = $this->getOption('logFile');

            if (!is_writable($file)) {
                throw new AsposeCloudException('The file '.$file.' either does not exist or is not writeable');
            }

            // Output to file
            file_put_contents($file, $this->formatFileLine($output), FILE_APPEND);
        } else {
            echo $output;
        }
    }
private function dispatch($message, $context)
    {
        $output = $this->interpolate($message, $context) . PHP_EOL;

        if ($this->getOption('outputToFile') === true) {
            $file = $this->getOption('logFile');

            if (!is_writable($file)) {
                throw new AsposeCloudException('The file '.$file.' either does not exist or is not writeable');
            }

            // Output to file
            file_put_contents($file, $this->formatFileLine($output), FILE_APPEND);
        } else {
            echo $output;
        }
    }
private function dispatch ( $ message , $ context ) { $ output = $ this -> interpolate ( $ message , $ context ) . PHP_EOL ; if ( $ this -> getOption ( 'outputToFile' ) === true ) { $ file = $ this -> getOption ( 'logFile' ) ; if ( ! is_writable ( $ file ) ) { throw new AsposeCloudException ( 'The file ' . $ file . ' either does not exist or is not writeable' ) ; } // Output to file file_put_contents ( $ file , $ this -> formatFileLine ( $ output ) , FILE_APPEND ) ; } else { echo $ output ; } }
Dispatch a log output message.

@param string $message
@param array  $context
@throws LoggingException
Dispatch a log output message .