承接 virdiggg/log-parser-ci3 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

virdiggg/log-parser-ci3

最新稳定版本:1.0.0

Composer 安装命令:

composer require virdiggg/log-parser-ci3

包简介

Log parser for default formatted log file in CodeIgniter 3

README 文档

README

Inspired from opcodesio/log-viewer for laravel.

HOW TO USE

  • Install this library with composer
composer require virdiggg/log-parser-ci3
  • Open your config/config.php, then edit this line.
-$config['log_threshold'] = 0;
+$config['log_threshold'] = 1;
  • Optional, you can use .log extension, not the default .php. Edit this line.
-$config['log_file_extension'] = '';
+$config['log_file_extension'] = 'log';
  • Create a controller to use this library. Example is application/controller/App.php. This example is in JSON format; you can modify it accordingly.
<?php defined('BASEPATH') or exit('No direct script access allowed');

use Virdiggg\LogParserCI3\MYViewer;

class App extends CI_Controller
{
    public $logs;
    public function __construct()
    {
        parent::__construct();
        $this->logs = new MYViewer();
    }

    public function logs()
    {
        // Log path
        $this->logs->setPath(APPPATH . 'logs');
        // Log extension
        $this->logs->setExt('php');

        $filterDate = $this->input->post('date') ? $this->input->post('date') : '2023-01-01';

        $this->logs->setName('log-' . $filterDate);

        $result = $this->logs->getLogs();

        echo json_encode($result);
        return;
    }
}
  • Open your website.
http://localhost/codeigniter/app/logs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固