定制 customlogcreator/customlogging 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

customlogcreator/customlogging

最新稳定版本:v1.0.0

Composer 安装命令:

composer require customlogcreator/customlogging

包简介

The Laravel Custom Logging Package is a package that enhances your Laravel application's logging capabilities. It provides options to create custom log handlers, organize log files into folders, and upload logs to an Amazon S3 bucket.

README 文档

README

Documentation, Installation, and Usage Instructions

Installation

Via Composer

$ composer require customlogcreator/customlogging
$ php artisan vendor:publish --tag=customlogging

added in providers

$ CustomLogCreator\CustomLogging\CustomLoggingServiceProvider::class,

Usage Instructions

Log::channel('dynamic_logs')->info('Log message here');

Configuration

In the custom-logging.php configuration file, you can customize the behavior of the package by modifying the provided configuration array. Here are the configuration options:

  • namespace: The namespace where custom log handlers and formatters are located.

  • is_folder: Indicates whether a folder structure should be used for organizing log files.

  • folder_name: The name of the folder where log files will be stored when 'is_folder' is set to true.

  • path_name: The path name where log files will be stored when 'is_folder' is set to false.

  • is_upload_s3_bucket: Indicates whether log files should be uploaded to an Amazon S3 bucket.

  • aws_destination_path: The destination path in the S3 bucket where log files should be uploaded. This is applicable only when 'is_upload_s3_bucket' is set to true.

config/customlogging.php
return [
    
    'is_directory' => true, // create new directory in logs folder
    'directory_name' => '', // logs/01-01-2023/01-01-202.log
    'path_name' => '', // 01-01-2023.log
    'is_upload_s3_bucket' => false,
    'aws_destination_path' => '',
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-30