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:
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.
-
Require the library via Composer by running the following command in your terminal:
composer require vektormuhammadlutfi/codeigniter-log-viewer:^1.0 -
Once the package is installed, you can load the
CILogViewerclass in your controller or any other place where you want to use it:use \VektorMuhammadLutfi\CodeIgniterLogViewer\CILogViewer;
-
Create a new instance of the
CILogViewerclass:$logViewer = new CILogViewer();
-
Call the
showLogsmethod to display the logs in the log viewer:echo $logViewer->showLogs();
-
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:
-
Make sure that the Composer autoloader is properly set up in your application. If you don't have an
index.phpfile in your public directory, create one and add the following lines:<?php require __DIR__.'/../vendor/autoload.php'; // Rest of your CodeIgniter 4 bootstrap code...
-
Load the
CILogViewerclass in your controller or any other place where you want to use it:use \VektorMuhammadLutfi\CodeIgniterLogViewer\CILogViewer;
-
Create a new instance of the
CILogViewerclass:$logViewer = new CILogViewer();
-
Call the
showLogsmethod to display the logs in the log viewer:echo $logViewer->showLogs();
-
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.
-
To retrieve a list of log files, send a GET request to
/logs?api=list. -
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. -
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=allto delete all log files. -
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 Viewerpackage 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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vektormuhammadlutfi/codeigniter-log-viewer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
Laravel 5.x.x library for integration Monolog Sentry
Pacote simplificado para persistência de logs
Collection of tools to use the full power of the Enyalius framework
A beautiful, zero-dependency UI for querying and viewing AWS CloudWatch logs directly inside your Laravel application.
Provides a Log Viewer for Laravel
统计信息
- 总下载量: 1.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-12
