定制 leoshtika/logger 二次开发

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

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

leoshtika/logger

Composer 安装命令:

composer require leoshtika/logger

包简介

The simplest PHP Logger class

README 文档

README

When using this library for the first time, it will create a "logfiles" folder in the root of your project, where all your log files will be placed, in different files for each month.

License Packagist

Requirements

  • PHP 5.3 or higher

Installation

You can use one of these 3 installation methods

1) Using Composer (recommended)

  • Using Composer from the command line
composer require leoshtika/logger:~1.0
  • Or using Composer with composer.json file
{
    "require": {
        "leoshtika/logger": "~1.0"
    }
}

2) Clone it from Github

git clone https://github.com/leoshtika/logger.git

3) Download it from Github

https://github.com/leoshtika/logger/archive/master.zip

Usage

Using Composer

If you are using composer require the 'vendor/autoload.php' file

<?php
require 'vendor/autoload.php';

use leoshtika\libs\Logger;

Logger::add();
Logger::add('Action must be taken immediately', Logger::LEVEL_EMERGENCY);
Logger::add('Interesting events', Logger::LEVEL_NOTICE);

Using the downloaded folder

If you donwloaded the folder manually then be sure to require the 'Logger.php' class

<?php
require 'path/to/logger/src/Logger.php';

use leoshtika\libs\Logger;

Logger::add();
Logger::add('Action must be taken immediately', Logger::LEVEL_EMERGENCY);
Logger::add('Interesting events', Logger::LEVEL_NOTICE);

Output

::1 [21/Sep/2014 12:42:41][INFO] (example.php) --> no message
::1 [21/Sep/2014 12:42:41][EMERGENCY] (example.php) --> Action must be taken immediately
::1 [21/Sep/2014 12:42:41][NOTICE] (example.php) --> Interesting events

Enjoy!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固