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

[NFR] Phalcon\Logger\Adapter::setLogLevel($logLevel) method #359

Closed
roman-kulish opened this issue Jan 28, 2013 · 4 comments
Closed

[NFR] Phalcon\Logger\Adapter::setLogLevel($logLevel) method #359

roman-kulish opened this issue Jan 28, 2013 · 4 comments

Comments

@roman-kulish
Copy link

Currently there is no way to set particular log level with Phalcon\Logger to log only messages of particular importance.

Adding Phalcon\Logger\Adapter::setLogLevel($logLevel) and optional attribute to logger __constructor which sets up a filter like (requestedLogLevel >= type) somewhere here https://github.com/phalcon/cphalcon/blob/master/ext/logger/adapter.c#L403 will resolve this problem.

@roman-kulish
Copy link
Author

Quick question: why don't you reuse error_log PHP function internally? Using it for logging can easily bring in-house two more SAPI & SysLog logging adapters.

@phalcon
Copy link
Collaborator

phalcon commented Jan 29, 2013

I refactored a bit the Logger component adding Formatters and a Syslog adapter to 0.9.0, here the docs: http://docs.phalconphp.com/en/0.9.0/reference/logging.html

@roman-kulish
Copy link
Author

SO, what about setting specific log level?

@phalcon
Copy link
Collaborator

phalcon commented Feb 13, 2013

This was implemented in the 1.0.0 branch

@phalcon phalcon closed this as completed Feb 13, 2013
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

1 participant