camuthig/laravel-segmentedsyslog 问题修复 & 功能扩展

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

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

camuthig/laravel-segmentedsyslog

最新稳定版本:1.0.0

Composer 安装命令:

composer require camuthig/laravel-segmentedsyslog

包简介

A Laravel Syslog Handler to handle maximum message lengths enforced by certain syslog implementations.

README 文档

README

Laravel Segmented Syslog provides an extension on the normal Laravel syslog service to enable breaking up log messages into chunks to fit into the maximum allowed length defined by different syslog implementations. Each messsage will include a message identifier as well as a total number of segments and the current segment number

The section below shows an example of the format. The identifier here would be 56290be46d:1:2 and 56290be46d:2:2

  Oct 22 09:16:36 computer.local laravel[34348]: test.DEBUG: 56290be46d:1:2 Debug log with a lot of [] []
  Oct 22 09:16:36 computer.local laravel[34348]: test.DEBUG: 56290be46d:2:2 text to display [] []

Requirements

Segmented Syslog is tested on Laravel version 4.2 and will work on any PHP system >= 5.3

Setup

  1. Install segmented syslog
composer require camuthig/laravel-segmentedsyslog:dev-master
  1. Replace the standard LogServiceProvider for SegmentedSyslogServiceProvider in config/app.php. Don't worry, the provider extends the base Laravel provider, so all functionality is still available.
'providers' => array(
  ...
  // 'Illuminate\Log\LogServiceProvider',
	'Camuthig\SegmentedSyslog\SegmentedSyslogServiceProvider',
	...
),
  1. Update your Log handler in global.php
Log::useSegmentedSyslog();

Configuration

When declaring the Log facade to use the segmented syslog, you are able to configure all of the properties for the syslog, with the parameters as follows

public function useSegmentedSyslog(
      $name = 'laravel',
      $level = 'debug',
      $length = 1024,
      $facility = LOG_USER,
      $bubble = true,
      $logopts = LOG_PID
  )

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-10-23