Skip to content

Commit

Permalink
Merge pull request #2281 from dreamsxin/2278
Browse files Browse the repository at this point in the history
Fix #2278 add Phalcon\Logger\Multiple::CRITICAL
  • Loading branch information
Phalcon committed Apr 2, 2014
2 parents 2bf72c2 + 21d16f7 commit af5910f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ext/logger/multiple.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ PHP_METHOD(Phalcon_Logger_Multiple, info);
PHP_METHOD(Phalcon_Logger_Multiple, notice);
PHP_METHOD(Phalcon_Logger_Multiple, warning);
PHP_METHOD(Phalcon_Logger_Multiple, alert);
PHP_METHOD(Phalcon_Logger_Multiple, critical);

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_multiple_push, 0, 0, 1)
ZEND_ARG_INFO(0, logger)
Expand Down Expand Up @@ -341,3 +342,23 @@ PHP_METHOD(Phalcon_Logger_Multiple, alert){

PHALCON_MM_RESTORE();
}

/**
* Sends/Writes an critical message to the log
*
* @param string $message
*/
PHP_METHOD(Phalcon_Logger_Multiple, critical){

zval *message, *type;

PHALCON_MM_GROW();

phalcon_fetch_params(1, 1, 0, &message);

PHALCON_ALLOC_GHOST_ZVAL(type);
ZVAL_LONG(type, PHALCON_LOGGER_CRITICAL);
PHALCON_CALL_METHOD(NULL, this_ptr, "log", message, type);

PHALCON_MM_RESTORE();
}

0 comments on commit af5910f

Please sign in to comment.