uga/php4logger-bundle
Composer 安装命令:
composer require uga/php4logger-bundle
包简介
php4logger log your object with symfony2
关键字:
README 文档
README
Bundle for logger Object for Symfony2 ```shell ____ _ _ _ _ __ | _ \| |__ _ __ | || | | | ___ __ _ __ _ ___ _ __ / _| ___ _ __ | |_) | '_ \| '_ \| || |_| | / _ \ / _` |/ _` |/ _ \ '__| | |_ / _ \| '__| | __/| | | | |_) |__ _| |__| (_) | (_| | (_| | __/ | | _| (_) | | |_| |_| |_| .__/ |_| |_____\___/ \__, |\__, |\___|_| |_| \___/|_| |_| |___/ |___/ ____ __ _ / ___| _ _ _ __ ___ / _| ___ _ __ _ _ | |__ _ _ \___ \| | | | '_ ` _ \| |_ / _ \| '_ \| | | | | '_ \| | | | ___) | |_| | | | | | | _| (_) | | | | |_| | | |_) | |_| | |____/ \__, |_| |_| |_|_| \___/|_| |_|\__, | |_.__/ \__, | |___/ |___/ |___/ ____ _ _____ ____ | _ \| | __ _ _ __ __|_ _| _ \ _____ __ | |_) | |/ _` | '_ \ / _ \| | | | | |/ _ \ \ / / | __/| | (_| | | | | __/| | | |_| | __/\ V / |_| |_|\__,_|_| |_|\___||_| |____/ \___| \_/ ```How to install ?
Just add this bundle with :
composer require uga/php4logger-bundle
Enable it in the Kernel
new uga\Php4LoggerApacheBundle\ugaPhp4LoggerApacheBundle(),
How to make it ?
In your controller:
$em = $this->getDoctrine()->getEntityManager() ; // Object $logger = $this->container->get('uga_php4_logger_apache')->getLogger() ; $logger->info($em); // info $logger->error($em); // error $logger->warn($em); // warning }
Result with color in terminal
tail -f /tmp/error.log | sed -e 's/\(.*INFO.*\)/\o033[36m\0/' \ -e 's/\(.*ERROR.*\)/\o033[31m\0/' \ -e 's/\(.*WARN.*\)/\o033[33m\0/'
Demo
Information:
- Programmer site :
- Web Site : https://logging.apache.org/log4php/quickstart.html
Contact Me
Nadir Fouka < nadir@fouka.ovh >
- Web Developer Grenoble Alpes University 2017
- Data Scientist Planet@Dev
统计信息
- 总下载量: 271.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-27

