laravel_easy_log/easy_log 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravel_easy_log/easy_log

最新稳定版本:1.0.13

Composer 安装命令:

composer require laravel_easy_log/easy_log

包简介

A package for logging in Laravel

README 文档

README

Description

Laravel Easy Log is a custom logging package for Laravel applications, allowing easy logging of messages with various levels (such as error, info, and success) to a database. It's particularly useful for tracking application behavior and user-specific actions.

Features

  • Logs messages with different types (error, success, info).
  • Optionally associates logs with user IDs and routes.
  • Stores logs in a dedicated custom_log database table.

Requirements

  • PHP >= 7.3
  • Laravel 6.x, 7.x, , 8.x , 9.0x or 10.x

Installation

  1. Require the Package
    Use Composer to install the package. Run the following command in your Laravel project:

    composer require laravel_easy_log/easy_log
  2. Run Migrations
    Publish and run the migrations to create the custom_log table in your database:

    php artisan vendor:publish --provider="LaravelEasyLog\EasyLog\CustomLogServiceProvider" --tag="migrations"
    php artisan migrate
  3. Configuration (Optional)
    If you want to customize the package, you can publish the configuration file:

    php artisan vendor:publish --provider="LaravelEasyLog\EasyLog\CustomLogServiceProvider" --tag="config"

Usage

After installing the package, you can log messages like this:

use LaravelEasyLog\EasyLog\Facades\CustomLogger;

CustomLogger::log($userId, 'Your log message', 'info', request()->path());

Contributing

Contributions to the Laravel Easy Log package are welcome. Please follow the standard procedures for contributing to open-source projects.

License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-13