wxxiong6/yii-seaslog Yii2日志模块使用Seaslog

yii2-seasLog extension

  1. Requirements
  2. Installation
  3. Usage
  4. Changelog

使用SeasLog高效日志扩展替换Yii2框架的日志模块,使其提高写日志效率。只需配置就可以实现。

SeasLog扩展https://github.com/SeasX/SeasLog/

Requirements

  • Yii2
  • PHP >=5.4
  • ext-seaslog installed

Installation

composer require wxxiong6/yii-seaslog:"1.0.0"

Usage

main.php

    'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                'default' => [
                    'class' => 'wxxiong6\yii\seaslog\Yii2SeasLog',
                    'levels' => ['trace', 'info', 'error', 'warning'],
                    'logFile' => 'backend/runtime/',
                    'logVars' => [],
                ],
            ],
        ],

为了跟yii2日志格式一致,修改php.ini seaslog日志格式

seaslog.default_template = %T %M

Changelog

Release 1.0 - Changelog
  • Official stable release
1 0
0 follower
7 downloads
Yii Version: Unknown
License: MIT
Category: Logging
Developed by: wxxiong6
Created on: Jul 25, 2019
Last updated: (not set)
Packagist Profile
Github Repository