fusic/accesslogs 问题修复 & 功能扩展

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

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

fusic/accesslogs

Composer 安装命令:

composer require fusic/accesslogs

包简介

AccessLogs plugin for CakePHP

README 文档

README

maintainer: @gorogoroyasu

Installation

composer require fusic/accesslogs

settings

in controller which you want to save logs,

$this->loadComponent('AccessLogs.AccessLogs');

//in case you dont want to save some specific data,
// you have to modify how to load the component like shown below.
// (like, password, credit cart, etc...)

$this->loadComponent('AccessLogs.AccessLogs', ['blacklist' => ['password']]);

next, you have to exec the migration. please copy the code below, and exec it!

<?php

use Migrations\AbstractMigration;

class AccessLogs extends AbstractMigration
{
    /**
     * Change Method.
     *
     * More information on this method is available here:
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
     */
    public function change()
    {
        $table = $this->table('access_logs');
        $table->addColumn('user_id',         'integer',        ['null' => true])
              ->addColumn('controller',      'string',         ['null' => true, 'limit' => 255])
              ->addColumn('action',          'string',         ['null' => true, 'limit' => 255])
              ->addColumn('passes',          'string',         ['null' => true, 'limit' => 255])
              ->addColumn('client_ip',       'string',         ['null' => true, 'limit' => 255])
              ->addColumn('url',             'string',         ['null' => true])
              ->addColumn('code',            'string',         ['null' => true, 'limit' => 255])
              ->addColumn('query',           'text',           ['null' => true])
              ->addColumn('data',            'text',           ['null' => true])
              ->addColumn('created',         'timestamp',      ['null' => false])
              ->addIndex('user_id')
              ->addIndex('controller')
              ->addIndex('action')
              ->addIndex('passes')
              ->addIndex('client_ip')
              ->addIndex('code')
              ->create();
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-12-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固