定制 toanlk/codeigniter_telescope 二次开发

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

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

toanlk/codeigniter_telescope

最新稳定版本:1.0.8

Composer 安装命令:

composer require toanlk/codeigniter_telescope

包简介

A simple log viewer for Codeigniter

README 文档

README

Install

Install via composer

composer require toanlk/codeigniter_telescope

Autoload

Edit application/config/config.php:

$config['composer_autoload'] = FALSE;
↓
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');

The folder path for log files can be configured by adding clv_log_folder_path to Codeigniter config.php file e.g.

$config['ci_telescope_log_folder_path'] = STORAGE_PATH.'/storage/logs/';

Integration

All that is required is to execute the show() method in a Controller that is mapped to a route:

A typical Controller (Logs.php) will have the following content:

class Logs extends CI_Controller
{
    private $logViewer;

    public function __construct()
	{
        parent::__construct(); 
        $this->load->helper('url');
        $this->logViewer = new \CI_Telescope\CI_Telescope();
    }

	public function index()
	{
        echo $this->logViewer->show();
    }

    // --------------------------------------------------------------------

    public function get_last_logs()
    {
        echo $this->logViewer->get_last_logs();
    }
}
git tag 1.0.1
git push origin 1.0.1
git push --tags

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-31