定制 nona-creative/log 二次开发

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

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

nona-creative/log

Composer 安装命令:

composer require nona-creative/log

包简介

Monolog factory for PHP projects used at Nona

README 文档

README

A simple library for logging. This library helps remove the boilerplate code required to connect to the remote logging infrustructure by suppling a factory for creating Monolog instances based on a global configuration.

Installation

Install the latest version with: php composer.phar require nona-creative/log

Basic usage

<?php
use Nona\Log\Logger;

$log = Logger::getInstance('demo');
$log->info('Hello world log message');

Advanced usage

<?php
use Nona\Log\LogConfig;
use Nona\Log\Logger;

Logger::setGlobalConfig(new LogConfig('demo-app', 'udp://localhost:5000', 'localhost'));
$log = Logger::getInstance('demo');

$log->info('Hello world log message', ['hello' => 'world']);

The LogConfig Object

Currently the LogConfig object is really basic and only requires 3 parameters.

LogConfig::__construct($applicationName, $host = null, $systemName = null)

When $host is blank, then logs will be output to stdout, which is great for development use. To log to a remote Logstash instance, supply $host with a url, eg: udp://localhost:5000.

If $systemName is left blank, then Monolog will do a lookup to get the local system name.

More Information

As all this is is a factory to manage Monolog, for any logging related information, refer to Monolog on GitHub

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固