We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Any example how to use and activate psr3 log in phalcon.

Hi can somebody give an example how to use Phalcon\Logger\Adapter\File as Psr\Log\LoggerInterface?

I've tried enabling phalcon.register_psr3_classes = On but the filelogger instance will fail if it is used by setLogger() returning: Argument 1 passed to EdaunRetail\Lib\PromoQuery\Logger::setLogger() must implement interface Psr\Log\LoggerInterface, instance of Phalcon\Logger\Adapter\File

What version of Phalcon are you using?

edited Nov '15

What version of Phalcon are you using?

The latest version 2.0.8, it is strange the the psr3 is not printed in phpinfo



Web framework delivered as a C-extension for PHP

phalcon enabled
Author  Phalcon Team and contributors
Version 2.0.8
Build Date  Oct 8 2015 14:45:09
Powered by Zephir   Version 0.8.0a

Directive   Local Value Master Value
phalcon.db.escape_identifiers   On  On
phalcon.db.force_casting    Off Off
phalcon.orm.cast_on_hydrate Off Off
phalcon.orm.column_renaming On  On
phalcon.orm.enable_implicit_joins   On  On
phalcon.orm.enable_literals On  On
phalcon.orm.events  On  On
phalcon.orm.exception_on_failed_save    On  On
phalcon.orm.ignore_unknown_columns  Off Off
phalcon.orm.late_state_binding  Off Off
phalcon.orm.not_null_validations    On  On
phalcon.orm.virtual_foreign_keys    On  On



; Enables/Disables globally the internal events
phalcon.orm.events = On

; Enables/Disables virtual foreign keys
phalcon.orm.virtual_foreign_keys = On

; Enables/Disables column renaming
phalcon.orm.column_renaming = On

; Enables/Disables automatic NOT NULL validation
phalcon.orm.not_null_validations = On

; Enables/Disables throwing an exception if save fails
phalcon.orm.exception_on_failed_save = On

; Enables/Disables literals in PHQL
phalcon.orm.enable_literals = On

; Enables/Disables auttomatic escape
phalcon.db.escape_identifiers = On

;psr3 logger interface
phalcon.register_psr3_classes = On;