src/Debug/Logger.php
public function log($level, $message, array $context = array())
    {
        if (!$this->isValidLevel($level)) {
            throw new InvalidArgumentException();
        }
        $str = $this->interpolate($message, $context);
        $meta = $this->getMeta($level, $context);
        if (\in_array($level, array('emergency','critical','error'))) {
            $this->debug->error($str, $context, $meta);
        } elseif (\in_array($level, array('warning','notice'))) {
            $this->debug->warn($str, $context, $meta);
        } elseif ($level == 'alert') {
            $this->debug->alert($str);
        } elseif ($level == 'info') {
            $this->debug->info($str, $context);
        } else {
            $this->debug->log($str, $context);
        }
    }
public function log($level, $message, array $context = array())
    {
        if (!$this->isValidLevel($level)) {
            throw new InvalidArgumentException();
        }
        $str = $this->interpolate($message, $context);
        $meta = $this->getMeta($level, $context);
        if (\in_array($level, array('emergency','critical','error'))) {
            $this->debug->error($str, $context, $meta);
        } elseif (\in_array($level, array('warning','notice'))) {
            $this->debug->warn($str, $context, $meta);
        } elseif ($level == 'alert') {
            $this->debug->alert($str);
        } elseif ($level == 'info') {
            $this->debug->info($str, $context);
        } else {
            $this->debug->log($str, $context);
        }
    }
Logs with an arbitrary level.

@param string        $level   debug, info, notice, warning, error, critical, alert, emergency
@param string|object $message message
@param array         $context array

@return void
@throws InvalidArgumentException If invalid level.