vektormuhammadlutfi/codeigniter-log-viewer 问题修复 & 功能扩展

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

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

vektormuhammadlutfi/codeigniter-log-viewer

Composer 安装命令:

composer require vektormuhammadlutfi/codeigniter-log-viewer

包简介

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

README 文档

README

CodeIgniter Log Viewer with Composer

The CodeIgniter Log Viewer package is a convenient library for viewing and managing log files in a CodeIgniter 4 application. It allows users to display logs, download log files, and perform other log-related operations easily.

A typical log view looks like this:

sample.png

Requirements

  • PHP 7.2 or later
  • CodeIgniter 4

Installation via Composer

You can install the CodeIgniter Log Viewer package using Composer, which is the recommended method for managing dependencies in CodeIgniter 4 applications.

  1. Require the library via Composer by running the following command in your terminal:

    composer require vektormuhammadlutfi/codeigniter-log-viewer:^1.0
    
  2. Once the package is installed, you can load the CILogViewer class in your controller or any other place where you want to use it:

    use \VektorMuhammadLutfi\CodeIgniterLogViewer\CILogViewer;
  3. Create a new instance of the CILogViewer class:

    $logViewer = new CILogViewer();
  4. Call the showLogs method to display the logs in the log viewer:

    echo $logViewer->showLogs();
  5. You can customize the behavior and appearance of the log viewer by modifying the configuration variables and view files as required.

Usage

To use the CodeIgniter Log Viewer package in your CodeIgniter 4 application, follow these steps:

  1. Make sure that the Composer autoloader is properly set up in your application. If you don't have an index.php file in your public directory, create one and add the following lines:

    <?php
    
    require __DIR__.'/../vendor/autoload.php';
    
    // Rest of your CodeIgniter 4 bootstrap code...
  2. Load the CILogViewer class in your controller or any other place where you want to use it:

    use \VektorMuhammadLutfi\CodeIgniterLogViewer\CILogViewer;
  3. Create a new instance of the CILogViewer class:

    $logViewer = new CILogViewer();
  4. Call the showLogs method to display the logs in the log viewer:

    echo $logViewer->showLogs();
  5. You can customize the behavior and appearance of the log viewer by modifying the configuration variables and view files as required.

API Usage

The CodeIgniter Log Viewer package also provides an API that allows you to programmatically access log files and perform operations.

  1. To retrieve a list of log files, send a GET request to /logs?api=list.

  2. To view the logs of a specific file, send a GET request to /logs?api=view&f=<file_name>, where <file_name> is the base64-encoded name of the log file.

  3. To delete a log file, send a GET request to /logs?api=delete&f=<file_name>, where <file_name> is the base64-encoded name of the log file you want to delete. You can also use &f=all to delete all log files.

  4. Make sure to handle the JSON response from the API and display it appropriately in your application.

Contributing

Contributions to this project are highly welcomed! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT license.

Credits

  • The CodeIgniter Log Viewer package is a refactor of the original library by Miguel Martinez. It is further developed and maintained by Muhammad Lutfi.

Resources

We hope you find the CodeIgniter Log Viewer package helpful for accessing and managing log files in your CodeIgniter 4 application. If you have any questions or need further assistance, please don't hesitate to reach out!

vektormuhammadlutfi/codeigniter-log-viewer 适用场景与选型建议

vektormuhammadlutfi/codeigniter-log-viewer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.12k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「log viewer」 「Code Igniter」 「CI4」 「Code Igniter 4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 vektormuhammadlutfi/codeigniter-log-viewer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vektormuhammadlutfi/codeigniter-log-viewer 我们能提供哪些服务?
定制开发 / 二次开发

基于 vektormuhammadlutfi/codeigniter-log-viewer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-12