public function log($message, $level = LogLevel::INFO, $context = array())
    {
        // Skip if no logger has been loaded.
        if (!$this->logger) {
            return;
        }

        if (!is_array($message)) {
            $message = array($message);
        }

        // The build is added to the context so the logger can use
        // details from it if required.
        $context['build'] = $this->build;

        foreach ($message as $item) {
            $this->logger->log($level, $item, $context);
        }
    }
public function log($message, $level = LogLevel::INFO, $context = array())
    {
        // Skip if no logger has been loaded.
        if (!$this->logger) {
            return;
        }

        if (!is_array($message)) {
            $message = array($message);
        }

        // The build is added to the context so the logger can use
        // details from it if required.
        $context['build'] = $this->build;

        foreach ($message as $item) {
            $this->logger->log($level, $item, $context);
        }
    }
public function log ( $ message , $ level = LogLevel :: INFO , $ context = array ( ) ) { // Skip if no logger has been loaded. if ( ! $ this -> logger ) { return ; } if ( ! is_array ( $ message ) ) { $ message = array ( $ message ) ; } // The build is added to the context so the logger can use // details from it if required. $ context [ 'build' ] = $ this -> build ; foreach ( $ message as $ item ) { $ this -> logger -> log ( $ level , $ item , $ context ) ; } }
Add an entry to the build log.
@param string|string[] $message
@param string $level
@param mixed[] $context
Add an entry to the build log .