xyqweb/log 问题修复 & 功能扩展

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

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

xyqweb/log

最新稳定版本:0.6.9.2

Composer 安装命令:

composer require xyqweb/log

包简介

create by wya team

关键字:

README 文档

README

Latest Stable Version

Run environment

  • PHP 7.1+.

Install Log PHP SDK

composer require xyqweb/log
  • If you use the composer to manage project dependencies, run the following command in your project's root directory:

      composer require xyqweb/log
    

    You can also declare the dependency on Log SDK for PHP in the composer.json file.

      "require": {
          "xyqweb/log": "~0.1"
      }
    

    Then run composer install to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code:

      require_once __DIR__ . '/vendor/autoload.php';
    

Quick use

Initialize an LogClient

Load in normal mode

<?php
$log = new \xyqWeb\log\Log([
    'driver'  => 'ssdb',//only accept file or ssdb
    'host'    => 'xx.xxx.xxx.xxx',//ssdb only
    'port'    => 'xxxxx',//ssdb only
    'project' => 'xxx',//your project name
    'key'     => 'xxxx',//ssdb only
    'path'    => 'path'//log path
]);
$log->write('test.log', ['content' => 'this is test content']);
// You can add subdirectories here
$log->write('test/test.log', ['content' => 'this is test content']);


$log = new \xyqWeb\log\Log([
    'driver'  => 'ssdb',//only accept file or ssdb
    'host'    => 'xx.xxx.xxx.xxx',//ssdb only
    'port'    => 'xxxxx',//ssdb only
    'project' => 'xxx',//your project name
    'key'     => 'xxxx',//ssdb only
    'path'    => 'path'//log path
]);
$log->write('test.log', ['content' => 'this is test content']);
// You can add subdirectories here
$log->write('test/test.log', ['content' => 'this is test content']);

Load in normal mode yii2

'components' => [
    'yiiLog' => [
        'class' => 'xyqWeb\log\YiiLog',
        'config'=>[
            'driver'  => 'ssdb',//only accept file or ssdb
            'host'    => 'xx.xxx.xxx.xxx',//ssdb only
            'port'    => 'xxxxx',//ssdb only
            'project' => 'xxx',//your project name
            'key'     => 'xxxx',//ssdb only
            'path'    => 'path'//log path
        ]
    ]
]
Yii::$app->yiiLog->->write('test.log', ['content' => 'this is test content']);
Yii::$app->yiiLog->write('test/test.log', ['content' => 'this is test content']);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固