承接 kozintsev/a-logger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kozintsev/a-logger

Composer 安装命令:

composer require kozintsev/a-logger

包简介

A Simple Logging Class For PHP

关键字:

README 文档

README

A project forked and refactored Oleg Kozinsev.

About

All that relates to Klogger is also relevant for ALogger. But Alogger creates an instance of the object for saving every time it is saved, which allows you to delete the log file while you work. Also removed all options and added the ability to split the file into parts.

Composer

From the Command Line:

composer require kozintsev/a-logger:dev-master

In your composer.json:

{
    "require": {
        "kozintsev/a-logger": "dev-master"
    }
}

Basic Usage

<?php

require_once ("vendor/autoload.php");

use kozintsev\ALogger\Logger;

$logger = new Logger(__DIR__ . '/tests/logs/test.log', \Psr\Log\LogLevel::DEBUG);
$logger->info('Returned a million search results');
$logger->error('Oh dear.');
$logger->debug('Got these users from the Database.', $users);

Output

[2014-03-20 3:35:43.762437] [INFO] Returned a million search results
[2014-03-20 3:35:43.762578] [ERROR] Oh dear.
[2014-03-20 3:35:43.762795] [DEBUG] Got these users from the Database.
    0: array(
        'name' => 'Kenny Katzgrau',
        'username' => 'katzgrau',
    )
    1: array(
        'name' => 'Dan Horrigan',
        'username' => 'dhrrgn',
    )

Additional Options

ALogger supports additional options via third parameter in the constructor:

<?php
// Example
$logger = new kozintsev\ALogger\Logger(__DIR__ . '/tests/logs/test.log', Psr\Log\LogLevel::WARNING, [
    'max_file_size' => 0, // max file size, if set to 0, the size is not checked
]);

Here's the full list:

Option Default Description
max_file_size 5120000 the maximum size of the log file, if set to 0, the size is not checked

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固