定制 hi2rashid/codeigniter-log-viewer 二次开发

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

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

hi2rashid/codeigniter-log-viewer

Composer 安装命令:

composer require hi2rashid/codeigniter-log-viewer

包简介

This is a simple Log Viewer for viewing Code Igniter log files on the browser

README 文档

README

Log Viewer for Codeigniter Application generated logs. Supports CI v3.1.9

Inspired by https://github.com/SeunMatt/codeigniter-log-viewer

Change Log:

Release version: v1.0.0 Date: 18-July-2018

  • You can change the log viewer path by passing path as constructor.

How to Use it

Install using composer

composer require hi2rashid/codeigniter-log-viewer

Copy following line of code to any of your Codeigniter Controller

Method 1 ()

In Welcome.php Controller

public function index() {
    $CILogs = new \CILogViewer\CILogViewer("/var/log/localhost/");
    echo $CILogs->showLogs();
    return;
}

Method 2 ()

In Welcome.php Controller

public function index() {
    $CILogs = new \CILogViewer\CILogViewer($this->config->item('ci_log_path'));
    echo $CILogs->showLogs();
    return;
}

In application/config/config.php Config file

$config['ci_log_path'] = "/var/log/localhost/ci_log_path"

Also you need to make sure the directories /var/log/localhost/ci_log_path created and writable

In Terminal : sudo mkdir -p /var/log/localhost/ci_log_path sudo chmod -Rf 777 /var/log/localhost/ci_log_path (Make sure not to use 777 on production systems)

Auto Refresh the Log View page

Just append ?rt=5000 (Example: http://localhost/codeigniter/welcome/logviewer?rt=5000) (5 seconds)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固