Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phalcon\Logger\Multiple::critical() #2278

Closed
BhSimon opened this issue Apr 1, 2014 · 0 comments
Closed

Phalcon\Logger\Multiple::critical() #2278

BhSimon opened this issue Apr 1, 2014 · 0 comments

Comments

@BhSimon
Copy link

BhSimon commented Apr 1, 2014

It appears the call to critical() from within multiple logging streams is not working. The following script reproduces the error Fatal error: Call to undefined method Phalcon\Logger\Multiple::critical().

<?php
use Phalcon\Logger,
    Phalcon\Logger\Multiple as MultipleStream,
    Phalcon\Logger\Adapter\File as FileAdapter,
    Phalcon\Logger\Adapter\Stream as StreamAdapter,
    Phalcon\Logger\Adapter\Firephp as Firephp;

class IndexController extends \Phalcon\Mvc\Controller
{
    public function indexAction()
    {
        $logger = new MultipleStream();
        $logger->push( new FileAdapter("../app/logs/test.log") );
        $logger->push( new Firephp("") );
        $logger->debug("[0] Debug");
        $logger->info("[1] Info");
        $logger->notice("[2] Notice");
        $logger->alert("[3] Alert");
        $logger->warning("[4] Warning");
        $logger->error("[5] Error");
        $logger->emergency("[6] Emergency");
        $logger->critical("[7] Critical"); // Does not work
    }
}

This happens with all adapters added to the multiple stream.
This code should have produced the line [7] Critical in both the file adapter and FirePHP console but instead produced the error above.
Phalcon 1.3.0
Mac OS X 10.6.8 Server
PHP 5.3.26
I haven't tried this code on a different OS, but if I can I will report on the results.

phalcon pushed a commit that referenced this issue Apr 2, 2014
Fix #2278 add Phalcon\Logger\Multiple::CRITICAL
@niden niden closed this as completed in 21d16f7 Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants