2013年1月15日星期二

Community News: PSR-3 Accepted - Logger Interface


The PHP-FIG (Framework Interoperability Group) has recently accepted the PSR-3 definition for a standardized Logger interface structure that can be used for interoperability between frameworks (and other tools).



The main goal is to allow libraries to receive a PsrLogLoggerInterface object and write logs to it in a simple and universal way. Frameworks and CMSs that have custom needs MAY extend the interface for their own purpose, but SHOULD remain compatible with this document. This ensures that the third-party libraries an application uses can write to the centralized application logs.


The implementation of this structure into your application makes it easier should you decide to swap out logging tools or want to create your own that can be used across several different frameworks. This is the third PSR to be accepted by the group, following PSR-1 and PSR-2 more related to coding standards.

没有评论:

发表评论