定制 anroots/kohana-loggly 二次开发

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

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

anroots/kohana-loggly

最新稳定版本:1.0.0

Composer 安装命令:

composer require anroots/kohana-loggly

包简介

A Kohana log writer for Loggly.com

README 文档

README

Write Kohana logs to a Loggly.com input. You need an account at loggly.com for this to work. The basic account is free, with quota limits.

Installation

As a Git submodule:

git submodule add git://github.com/anroots/kohana-loggly.git modules/loggly

As a Composer dependency

{
	"require": {
		"anroots/kohana-loggly":"1.*"
	}
}

Activate the module in bootstrap.php.

<?php
Kohana::modules(array(
	...
	'loggly' => MODPATH.'kohana-loggly',
));

Create a new Loggly input

Create a new input via the loggly.com control panel. The input should be a JSON-enable HTTPS input. The module sends logs to Loggly JSON-encoded; that means you can do some really cool stuff with that data.

New Loggly Input

Add the log writer after module activation

<?php
Kohana::$log->attach(new Log_Loggly('my-input-key'));

You can use the $levels and $min_level params of $log->attach to set restraints on when to log to Loggly:

Kohana::$log->attach(new Log_Loggly('my-input-key'), Log::INFO); // Log only messages starting from level INFO (no DEBUG)

Log some data in your code

<?php
Kohana::$log->add(Log::EMERGENCY,'The world will end on :time.',[':time'=>time()+60]);

Results appear in the Loggly console

Loggly Console

Licence

MIT licence

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固