承接 ycanga/central-logger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ycanga/central-logger

最新稳定版本:v1.1.1

Composer 安装命令:

composer require ycanga/central-logger

包简介

Centralized logging package for Laravel

README 文档

README

A simple Laravel logging driver that sends logs to a central server.

🚀 Installation

  1. Install the package via Composer
   composer require ycanga/central-logger
  1. Publish the configuration file
php artisan vendor:publish --provider="ycanga\CentralLogger\CentralLoggerServiceProvider" --tag="config"

⚙️ Configuration

  1. Add the following environment variables to your .env file:
LOG_CHANNEL=central_logger
LOG_ENDPOINT=[YOUR-CENTRAL-LOGGER-SERVER-ENDPOINT]/api/log
LOG_API_KEY=[YOUR-PROJECT-API-KEY]
  1. Register the logging channel in config/logging.php:
'channels' => [
    // Other channels...

    'central_logger' => [
        'driver' => 'central_logger',
    ],
],

📤 Usage

Once configured, Laravel will send all log messages to your central logger server via the central_logger channel.

You can also log manually using the channel:

Log::channel('central_logger')->info('This is a test log from my project.');

Developed with ❤️ by ycanga

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-06