yii\BaseYii::error PHP Method

error() public static method

An error message is typically logged when an unrecoverable error occurs during the execution of an application.
public static error ( string $message, string $category = 'application' )
$message string the message to be logged.
$category string the category of the message.
    public static function error($message, $category = 'application')
    {
        static::getLogger()->log($message, Logger::LEVEL_ERROR, $category);
    }