Log and drivers 1.0.0
2021-02-11
622次浏览
First verisons of yiisoft/log and some of the drivers called "targets" were released.
Log is PSR-3 compatible so using it in your apps is easy:
final class MyClass
{
private \Psr\Log\LoggerInterface $logger;
public function __construct(\Psr\Log\LoggerInterface $logger)
{
$this->logger = $logger;
}
public function doIt(): void
{
$this->logger->info('Doing it!');
// ...
}
}
The strength of the library is in its convenient configuration. You are always logging via the same logger instance but can route log messages to different targets. Each target processes messages differently. It may write it to a file, send it to syslog, email it or send it to another PSR-3 compatible logger.
Details could be found in the package readme.
Along with the main log package, the file and syslog targets were released.
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- auth client
- view
- bootstrap
- html
- release
- redis
- apidoc
- Yii 2.0
- Yii 1.1
- mongodb
- mailer
- extensions
- twig
- gii
- queue
- runner
- http 客户端
- console
- validation
- sphinx
- cache
- widget
- translator
- hydrator
- error handler
- db
- symfonymailer
- log
- http
- config
- assets
- swiftmailer
- 图书
- imagine
- csrf
- elasticsearch
- swagger
- IDE
- i18n
- router
- definitions
- fastroute
- logging
- smarty
- user