src/Helpers/Log.php
public function log($severity, $message, array $args = array())
    {
        if ($severity <= max($this->getLogLevel(), Log::Warning)) {
            if (count($args) > 0) {
                $message = vsprintf($message, $args);
            }
            $this->write($message, $severity);
        }
        return $message;
    }
public function log($severity, $message, array $args = array())
    {
        if ($severity <= max($this->getLogLevel(), Log::Warning)) {
            if (count($args) > 0) {
                $message = vsprintf($message, $args);
            }
            $this->write($message, $severity);
        }
        return $message;
    }
public function log ( $ severity , $ message , array $ args = array ( ) ) { if ( $ severity <= max ( $ this -> getLogLevel ( ) , Log :: Warning ) ) { if ( count ( $ args ) > 0 ) { $ message = vsprintf ( $ message , $ args ) ; } $ this -> write ( $ message , $ severity ) ; } return $ message ; }
Formats and logs the message if the log level indicates so.

Errors and Warnings are always logged, other levels only if the log level
is set to do so.

Formatting involves:
- calling vsprintf() if $args is not empty
- adding "Acumulus {version} {severity}: " in front of the message.

@param int $severity
@param string $message
@param array $args

@return string
The full formatted message whether it got logged or not.
Formats and logs the message if the log level indicates so .