tijanidevit/php-logger
最新稳定版本:v1.0.0
Composer 安装命令:
composer require tijanidevit/php-logger
包简介
Simple customizable logger with web viewer, pagination, filtering, and security.
README 文档
README
A simple, customizable logger with a web-based log viewer that supports:
- ✅ Pagination
- ✅ Filtering by log level
- ✅ Search functionality
- ✅ Sorting by timestamp
- ✅ Optional password protection
- ✅ Easy publishing of config and viewer
📦 Installation
composer require tijanidevit/php-logger
🔧 Publishing Assets
Manual:
composer run-script publish-logger-assets
With --auto (forces overwrite or for CI):
composer run-script publish-logger-assets -- --auto
⚙️ Configuration
Edit config/logger.php:
return [ 'log_file' => __DIR__ . '/../storage/logs/app.log', 'password' => 'password', 'lines_per_page' => 100, ];
🔍 Log Viewer
Access via browser:
http://your-app.com/view-log.php?password=password
✏️ Usage Example
use TijaniDevIt\Logger\Logger; $logger = new Logger(); $logger->info("Starting process..."); $logger->warning("Something may be wrong."); $logger->error("An error occurred.");
📜 License
MIT
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-16