承接 pgtruesdell/laravel-logsnag 相关项目开发

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

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

pgtruesdell/laravel-logsnag

最新稳定版本:1.3

Composer 安装命令:

composer require pgtruesdell/laravel-logsnag

包简介

Logsnag's realtime monitoring + your Laravel project = 😎

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to easily integrate Logsnag into your Laravel application.

Installation

You can install the package via composer:

composer require pgtruesdell/laravel-logsnag

You can publish the config file with:

php artisan vendor:publish --tag="laravel-logsnag-config"

This is the contents of the published config file:

return [
    /**
     * The project name.
     */
    'project' => env('LOGSNAG_PROJECT', 'my-laravel-app'),

    /**
     * The default channel name for the monolog driver.
     */
    'channel' => env('LOGSNAG_CHANNEL', 'app-events'),

    /**
     * Your logsnag API token.
     */
    'token' => env('LOGSNAG_TOKEN', ''),

    /**
     * A mapping of icons for logging.
     */
    'icons' => [
        'DEBUG'     => 'ℹ️',
        'INFO'      => 'ℹ️',
        'NOTICE'    => '📌',
        'WARNING'   => '⚠️',
        'ERROR'     => '⚠️',
        'CRITICAL'  => '🔥',
        'ALERT'     => '🔔️',
        'EMERGENCY' => '💀',
    ],
];

Usage

Using the built-in helper function:

logsnag(
    'app',
    'Artist Created',
    'Artist id 589 created by user 2',
    '🎨',
);

Using the facade:

use PGT\Logsnag\Facades\Logsnag;

Logsnag::log(
    channel: 'app',
    event: 'Artist Created',
    description: 'Artist id 589 created by user 2',
    icon: '🎨',
    notify: false
);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-06