Search by

format_rsyslog / laravel_rsyslog

wuwielk

There is no license information available for the latest version (1.0.3) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Package info

github.com/Cailiang/laravel_rsyslog

pkg:composer/format_rsyslog/laravel_rsyslog

Statistics

Installs: 344

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.3 2019-04-14 07:54 UTC

This package is not auto-updated.

Last update: 2026-07-14 01:19:38 UTC


README

Installation

$ composer require "format_rsyslog/laravel_rsyslog" -vvv

要求

laravel 版本 >= 5.6

注册

config -> app.php -> providers 添加 Output\Standardlog\StandardlogServiceProvider::class config -> app.php -> aliases 添加 "Standardlog" => Output\Standardlog\Facades\Standardlog::class

env 配置

PAPERTRAIL_URL = (rsyslog 服务器 ip) PAPERTRAIL_PORT = 514

使用

项目中添加 use Standardlog

    Standardlog::info($content,  $message, $label, $channel);
    Standardlog::debug($content,  $message, $label, $channel);
    Standardlog::error($content,  $message, $label, $channel');
    Standardlog::warning$content,  $message, $label, $channel);
    Standardlog::notice($content,  $message, $label, $channel);

参数含义: content: 错误内容 message: 错误提示 label:错误类型 1:业务 2: 代理 3:网络 默认为 1 channel: 默认 papertrail 以请求 ip 方式 与 rsyslog 服务器交互