承接 fsm/module-log-viewer 相关项目开发

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

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

fsm/module-log-viewer

Composer 安装命令:

composer require fsm/module-log-viewer

包简介

Magento / Mage-OS admin Log Viewer with per-role glob patterns and download ACL.

README 文档

README

CI License: OSL-3.0 PHP

Admin Log Viewer for Magento Open Source / Mage-OS. Lists and displays files under var/log with per-role glob patterns and optional download permission.

Features

  • Grid of log files allowed for the current admin role
  • Tail view (last 512 KB) with in-page search
  • Download gated by ACL and role flag
  • Role tab under System → Permissions → User Roles to configure patterns

Requirements

  • PHP 8.2+
  • Magento Open Source / Mage-OS 2.4+ (compatible with Magento Backend, User, Authorization, UI)

Installation

Composer (recommended for distribution)

composer require fsm/module-log-viewer
bin/magento module:enable Fsm_LogViewer
bin/magento setup:upgrade
bin/magento cache:flush

App code

Copy this module to app/code/Fsm/LogViewer, then run the same module:enable / setup:upgrade commands.

Configuration

  1. Open System → Permissions → User Roles.

  2. Edit a role → Log Viewer tab.

  3. Enter one glob pattern per line (basename under var/log), for example:

    system.log
    exception.log
    
  4. Optionally enable Allow Download.

  5. Assign ACL resources under System → Tools → Log Viewer:

    • View Logs — list and open files
    • Download Logs — download (also requires the role flag)

Empty patterns mean the role sees no log files.

The Size column filter uses bytes (display is human-readable).

Security

Log files often contain personal data, stack traces, tokens, or other secrets.

  • Prefer specific patterns (system.log, exception.log) over *.log.
  • Grant Download only to roles that need full files.
  • The module rejects path traversal, null bytes, and symlinks under var/log.
  • Viewing still exposes file contents to anyone with View ACL and matching patterns — treat role setup as a security control.

To report vulnerabilities, see SECURITY.md.

ACL

Resource ID
Log Viewer Fsm_LogViewer::logviewer
View Logs Fsm_LogViewer::view
Download Logs Fsm_LogViewer::download

Development

Commit messages follow Conventional Commits.

Unit tests (standalone package)

composer install
composer run test

Unit tests (from Magento root)

vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist \
  app/code/Fsm/LogViewer/Test/Unit --no-extensions

Coding standard

vendor/bin/phpcs --standard=Magento2 app/code/Fsm/LogViewer

Coverage includes path/pattern safety, LogFileService (ACL, symlink, tail, download), repository, role-save plugin, listing DataProvider, role tab, and admin controllers.

Contributing

See CONTRIBUTING.md for setup, PR guidelines, and coding standards. Please follow the Code of Conduct.

Changelog

See CHANGELOG.md.

License

Open Software License (OSL 3.0) and Academic Free License (AFL 3.0). See COPYING.txt, LICENSE.txt, and LICENSE_AFL.txt.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固