Download the PHP package aishan/laravel-log-notice without Composer
On this page you can find all versions of the php package aishan/laravel-log-notice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aishan/laravel-log-notice
More information about aishan/laravel-log-notice
Files in aishan/laravel-log-notice
Download aishan/laravel-log-notice
More information about aishan/laravel-log-notice
Files in aishan/laravel-log-notice
Please rate this library. Is it a good library?
Informations about the package laravel-log-notice
laravel-log-notice
本项目支持自定义laravel框架的日志行为,提供异常日志邮件自动发送功能和推送异常日志到RabbitMQ中。
安装
* 目前只在laravel5.1及以上版本测试通过
使用
-
在config/app.php的“providers”中加入:
-
拷贝配置文件到config目录:
在根目录执行:
- 框架中加入配置Monolog代码
在bootstrap/app的return $app;
之前加入一下代码:
* 注意:使用这个扩展后,Laravel原本的日志配置将失效,譬如config/app.php
文件中关于关于日志的配置都将失效,而我们在此刻可以启用新的日志配置文件config/log-notice.php
4.配置
配置文件为config/log-notice.php
:
* 其中,默认开启的为本地日志文件,邮件通知和推送消息至RabbitMQ的动作均需手动开启。
- 为什么消息会推送至RabbitMQ?
因为,团队生产环境用的Logstash是通过RMQ通信转发的,所以实际应用场景是将日志消息最终转入日志服务器;
2.什么样的日志会被邮件发送?
八种日志等级在系统的定义:
本扩展中的实现:
所以,debug和info的日志都不会以邮件形式发送,而往RabbitMQ中发送的日志只排除了debug类型的信息。
All versions of laravel-log-notice with dependencies
PHP Build Version
Package Version
The package aishan/laravel-log-notice contains the following files
Loading the files please wait ....