public static function log($message, $level = self::LOG_DEBUG)
    {
        $logger = self::$serviceContainer->getLogger();

        switch ($level) {
            case self::LOG_EMERG:
                return $logger->emergency($message);
            case self::LOG_ALERT:
                return $logger->alert($message);
            case self::LOG_CRIT:
                return $logger->critical($message);
            case self::LOG_ERR:
                return $logger->error($message);
            case self::LOG_WARNING:
                return $logger->warning($message);
            case self::LOG_NOTICE:
                return $logger->notice($message);
            case self::LOG_INFO:
                return $logger->info($message);
            default:
                return $logger->debug($message);
        }
    }
public static function log($message, $level = self::LOG_DEBUG)
    {
        $logger = self::$serviceContainer->getLogger();

        switch ($level) {
            case self::LOG_EMERG:
                return $logger->emergency($message);
            case self::LOG_ALERT:
                return $logger->alert($message);
            case self::LOG_CRIT:
                return $logger->critical($message);
            case self::LOG_ERR:
                return $logger->error($message);
            case self::LOG_WARNING:
                return $logger->warning($message);
            case self::LOG_NOTICE:
                return $logger->notice($message);
            case self::LOG_INFO:
                return $logger->info($message);
            default:
                return $logger->debug($message);
        }
    }
public static function log ( $ message , $ level = self :: LOG_DEBUG ) { $ logger = self :: $ serviceContainer -> getLogger ( ) ; switch ( $ level ) { case self :: LOG_EMERG : return $ logger -> emergency ( $ message ) ; case self :: LOG_ALERT : return $ logger -> alert ( $ message ) ; case self :: LOG_CRIT : return $ logger -> critical ( $ message ) ; case self :: LOG_ERR : return $ logger -> error ( $ message ) ; case self :: LOG_WARNING : return $ logger -> warning ( $ message ) ; case self :: LOG_NOTICE : return $ logger -> notice ( $ message ) ; case self :: LOG_INFO : return $ logger -> info ( $ message ) ; default : return $ logger -> debug ( $ message ) ; } }
Logs a message
If a logger has been configured, the logger will be used, otherwise the
logging message will be discarded without any further action

@param string $message The message that will be logged.
@param int    $level   The logging level.

@return boolean True if the message was logged successfully or no logger was used.
Logs a message If a logger has been configured the logger will be used otherwise the logging message will be discarded without any further action