Download the PHP package rexwsd/laravel-log without Composer
On this page you can find all versions of the php package rexwsd/laravel-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-log
基于monoLog二次开发的日志Libray
Install
方式一
composer require rexwsd/laravel-log
方式二
Step1: 在项目composer.json文件require段中增加如下:
Step2: 执行
composer update rexwsd/laravel-log
Document
config配置
拷贝包内config/logging.php 到项目下 config/logging.php
env配置
配置日志写入路径
服务注册
bootstrap/app.php 内注册服务
食用方法
- getLogger 的参数是你要生成日志的文件名 上面例子最终会生成一个 adapter.error.log 的文件
- error 是日志的级别 (附录1.1)
- error 参数1 type string 日志标题
- error 参数2 type array 一个map类型数组 key=>string value=>object
生成日志格式
附录
1.1 日志等级
- DEBUG (100): Detailed debug information.详细的Debug信息
- INFO (200): Interesting events. Examples: User logs in, SQL logs.感兴趣的事件或信息,如用户登录信息,SQL日志信息
- NOTICE (250): Normal but significant events.普通但重要的事件信息
- WARNING (300): Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
- ERROR (400): Runtime errors that do not require immediate action but should typically be logged and monitored.
- CRITICAL (500): Critical conditions. Example: Application component unavailable, unexpected exception.
- ALERT (550): Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
- EMERGENCY (600): Emergency: system is unusable.
All versions of laravel-log with dependencies
PHP Build Version
Package Version
The package rexwsd/laravel-log contains the following files
Loading the files please wait ....