Version: 1.0.0
Author: FlowAxy
Developer: iTeffa (iteffa@flowaxy.com)
Studio: flowaxy.com
License: Proprietary
Logs Viewer is a plugin for Flowaxy CMS that provides a convenient web interface for viewing and managing system logs through the administrative panel. The plugin allows you to view, filter, export, and delete log files without requiring server access via SSH or FTP.
- π Log Viewing β Convenient interface for viewing all log files
- π Filtering β Filter logs by level (DEBUG, INFO, WARNING, ERROR, CRITICAL), date, and text
- π Statistics β Display count of entries by type
- πΎ Export β Export logs in TXT, CSV, and JSON formats
- ποΈ Deletion β Delete individual files or all logs at once
- π Sorting β Automatic sorting of files by modification date
- π¨ Modern UI β Intuitive interface with responsive design support
- Support for large log files with entry limit controls
- Secure file path validation (Path Traversal prevention)
- CSRF protection for all write operations
- Optimized architecture using services
- Integration with Flowaxy CMS access control system
- PHP >= 8.4.0
- Flowaxy CMS with plugin support
admin.logs.viewpermission for viewingadmin.logs.deletepermission for deletion
- Copy the plugin directory to
plugins/logs-view/ - Activate the plugin through the admin panel (Settings β Plugins)
- Verify user permissions
The plugin will automatically register the route and menu item after activation.
- Log in to the admin panel
- Navigate to System β Logs in the menu
- Or go directly to
/admin/logs-view
- Select a log file from the dropdown list
- View entries in real-time
- Use filters to find specific entries
The plugin supports several filtering methods:
- By Level β Filter buttons (All, Errors, Warnings, Information, etc.)
- By Date β Date range selection
- By Text β Search in log messages
- Entry Count β Select number of entries to display (50, 100, 200, 500, All)
- Apply necessary filters (optional)
- Click the Export button
- Select format: TXT, CSV, or JSON
- File will download automatically
- Individual File β Click the trash icon next to the selected file
- All Files β Click Clear All Logs button in the page header
logs-view/
βββ assets/
β βββ scripts/
β β βββ logs-view.js # JavaScript for filtering and interactivity
β βββ styles/
β βββ logs-view.css # Styles for the log viewing page
βββ src/
β βββ admin/
β β βββ pages/
β β βββ LogsViewAdminPage.php # Admin page for viewing logs
β βββ Services/
β βββ LogsService.php # Service for working with logs
βββ templates/
β βββ logs-view.php # Page viewing template
βββ init.php # Plugin initialization
βββ plugin.json # Plugin metadata
βββ README.md # Documentation
The plugin uses an architecture optimized for Flowaxy CMS standards:
- LogsService β Service for working with log files, uses
FileandDirectoryclasses fromengine/infrastructure/filesystem - LogsViewAdminPage β Admin panel page that displays the user interface
- Templates β PHP templates for HTML rendering
The plugin supports the standard Flowaxy CMS log format:
[YYYY-MM-DD HH:MM:SS] LEVEL: message | IP: xxx.xxx.xxx.xxx | METHOD /path | Context: {...}
Example:
[2025-11-28 20:45:43] INFO: Database connected | IP: 172.23.160.1 | GET /admin/dashboard | Context: {"database":"mysql"}
- β CSRF protection for all write operations
- β Permission checks before executing operations
- β File path validation (Path Traversal prevention)
- β Output sanitization to prevent XSS
- β File location verification within allowed directory
The plugin uses the Flowaxy CMS permission system:
admin.logs.viewβ Permission to view logs (required)admin.logs.deleteβ Permission to delete logs (optional)
Users without permissions are automatically redirected to the admin panel home page.
The plugin is fully integrated with Flowaxy CMS Engine:
- Uses
BasePluginfor basic functionality - Registers through the hook system (
admin_register_routes,admin_menu) - Uses admin UI components (
AdminPage, breadcrumbs, components) - Uses helpers (
UrlHelper,SecurityHelper,Response)
By default, the plugin looks for log files in:
storage/logs/
This can be changed by defining the LOGS_DIR constant in the system configuration:
define('LOGS_DIR', '/custom/path/to/logs/');By default, 50 most recent entries are displayed. This can be changed via URL parameter:
/admin/logs-view?file=app-2025-11-28.log&limit=100
Available values: 50, 100, 200, 500, 0 (all entries)
The plugin uses the following components from Engine:
engine/core/support/base/BasePlugin.phpengine/infrastructure/filesystem/File.phpengine/infrastructure/filesystem/Directory.phpengine/interface/admin-ui/includes/AdminPage.phpengine/core/support/helpers/UrlHelper.phpengine/core/support/helpers/SecurityHelper.php
To extend plugin functionality:
- Adding New Filters β Edit the
applyFilters()method inLogsService.php - Adding Export Formats β Add a new method in
LogsViewAdminPage.php - UI Customization β Edit the template
templates/logs-view.phpand stylesassets/styles/logs-view.css
To test the plugin:
- Ensure you have log files in the
storage/logs/directory - Check user permissions
- Test CSRF protection by attempting an operation without a token
- Test path validation by attempting to access a file outside the logs directory
If you found a bug or have questions:
- Check log files for errors
- Verify permissions for the logs directory
- Ensure PHP has read permissions for log files
Proprietary. All rights reserved.
- β¨ Initial release
- β Basic log viewing
- β Filtering by level, date, and text
- β Export to TXT, CSV, JSON
- β Log file deletion
- β Flowaxy CMS Engine integration
- β Optimized architecture using services
Developer: iTeffa
Email: iteffa@flowaxy.com
Studio: FlowAxy
Website: https://flowaxy.com
Made with β€οΈ for Flowaxy CMS