PHPackages                             liquiddesign/nette-log-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. liquiddesign/nette-log-viewer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

liquiddesign/nette-log-viewer
=============================

Ⓛ Nette log viewer - Developer tool for viewing Tracy logs

v1.0.2(5mo ago)0129↓100%MITLattePHP ^8.3 || ^8.4CI passing

Since Nov 18Pushed 5mo agoCompare

[ Source](https://github.com/liquiddesign/nette-log-viewer)[ Packagist](https://packagist.org/packages/liquiddesign/nette-log-viewer)[ RSS](/packages/liquiddesign-nette-log-viewer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Ⓛ Log Viewer
============

[](#ⓛ-log-viewer)

Nette log viewer - Developer tool for viewing and downloading Tracy log files.

[![PHPStan](https://camo.githubusercontent.com/d117944b58da8146f96b4ef7403807610a20eeb3fbcaaaf95157bbcdad1686eb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e2e737667)](https://phpstan.org/)[![Latest Stable Version](https://camo.githubusercontent.com/1528be65969663f4b78a919945fb537d197fa85b847420e398e5a300b1fe3999/68747470733a2f2f706f7365722e707567782e6f72672f6c697175696464657369676e2f6e657474652d6c6f672d7669657765722f762f737461626c65)](https://packagist.org/packages/liquiddesign/nette-log-viewer)[![License](https://camo.githubusercontent.com/d46ba10d29051a37bae9352b9bd170feeefd90e884d5081d7274cce87f2a29cb/68747470733a2f2f706f7365722e707567782e6f72672f6c697175696464657369676e2f6e657474652d6c6f672d7669657765722f6c6963656e7365)](https://packagist.org/packages/liquiddesign/nette-log-viewer)

Features
--------

[](#features)

- 📁 **Browse log directory structure** - Navigate through folders and files
- 👀 **View log files** - Syntax highlighting for better readability
- 🔍 **Search in files** - Find text with configurable context lines
- 📄 **Pagination** - Browse large directories (100 items per page) and files (100KB chunks)
- 💾 **Download support** - Download log files directly
- 🎨 **HTML dumps** - View Tracy exception dumps in iframe
- 🔐 **Secure** - Only accessible when Tracy debugger is enabled (debug mode)

Screenshots
-----------

[](#screenshots)

### Directory Browser

[](#directory-browser)

Browse your log directory with pagination and search functionality.

### File Viewer

[](#file-viewer)

View log files with syntax highlighting, pagination, and in-file search.

Installation
------------

[](#installation)

```
composer require liquiddesign/nette-log-viewer
```

Usage
-----

[](#usage)

### 1. Register Presenter in Router

[](#1-register-presenter-in-router)

#### Option A: Using NEON Configuration (Recommended)

[](#option-a-using-neon-configuration-recommended)

Add routes to your `config/pages.neon` or similar configuration file:

```
routing:
	routes:
		'log-viewer/view/': LogViewer:LogViewer:view
		'log-viewer/download/': LogViewer:LogViewer:download
		'log-viewer[/]': LogViewer:LogViewer:default
```

If you extended the presenter in your app namespace (e.g., `App\Web\LogViewerPresenter`):

```
routing:
	routes:
		'log-viewer/view/': Web:LogViewer:view
		'log-viewer/download/': Web:LogViewer:download
		'log-viewer[/]': Web:LogViewer:default
```

#### Option B: Using PHP Router

[](#option-b-using-php-router)

Alternatively, add the route in your RouterFactory:

```
// app/Router/RouterFactory.php
use LogViewer\LogViewerPresenter;

$router[] = new Route('log-viewer[/][/]', LogViewerPresenter::class);
```

### 2. Access Log Viewer

[](#2-access-log-viewer)

Navigate to:

```
https://your-app.com/log-viewer

```

**Note:** The log viewer is only accessible when Tracy debugger is enabled (debug mode). This is typically controlled by your `config.neon`:

```
parameters:
	debugMode: %debugMode%  # or specific IP addresses
```

### 3. Features

[](#3-features)

#### Directory Browser

[](#directory-browser-1)

- Navigate through your log directory structure
- Search for files and folders by name
- Pagination for directories with many files (100 items per page)
- Sort by type (directories first) and name

#### File Viewer

[](#file-viewer-1)

- View text log files with syntax highlighting
- View HTML Tracy dumps in iframe
- Pagination for large files (100KB chunks)
- Search within files with configurable context (3-300 lines)
- Download any log file

Configuration
-------------

[](#configuration)

### Custom Log Directory

[](#custom-log-directory)

By default, the log viewer uses `Tracy\Debugger::$logDirectory`. If you need a custom log directory, extend the presenter and override the log directory in `startup()`:

```
namespace App\Web;

use LogViewer\LogViewerPresenter as BaseLogViewerPresenter;

class LogViewerPresenter extends BaseLogViewerPresenter
{
	protected function startup(): void
	{
		parent::startup();

		// Option 1: Use hardcoded path
		$this->logDir = '/custom/path/to/logs';

		// Option 2: Use container parameters (recommended)
		$this->logDir = $this->container->getParameters()['tempDir'] . '/log';
	}
}
```

Then register your extended presenter in router configuration instead of the base one.

### Access Control

[](#access-control)

The package automatically restricts access to debug mode only. For additional security, you can extend the presenter and add custom access control:

```
namespace App\Web;

use LogViewer\LogViewerPresenter as BaseLogViewerPresenter;
use Nette\Application\ForbiddenRequestException;

class LogViewerPresenter extends BaseLogViewerPresenter
{
	protected function startup(): void
	{
		parent::startup();

		// Add custom access control (e.g., admin role required)
		if (!$this->getUser()->isInRole('admin')) {
			throw new ForbiddenRequestException();
		}
	}
}
```

Requirements
------------

[](#requirements)

- PHP 8.3 or 8.4
- Nette Application 3.2+
- Nette Utils 4.0+
- Tracy 2.10+

Development
-----------

[](#development)

### Code Quality

[](#code-quality)

```
# PHPStan analysis (level 8)
composer phpstan

# Code style check
composer phpcs

# Code style auto-fix
composer phpcsfix
```

### Testing

[](#testing)

The package is tested in production environment with Abel e-commerce platform.

Security
--------

[](#security)

**Important:** This package is a developer tool and should **never** be accessible in production. Always ensure:

1. Tracy debugger is disabled in production
2. Access is restricted by IP address or authentication
3. Log files don't contain sensitive information

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) file for details.

Credits
-------

[](#credits)

Developed by [Liquid Design](https://www.lqd.cz).

Support
-------

[](#support)

For issues and feature requests, please use [GitHub Issues](https://github.com/liquiddesign/nette-log-viewer/issues).

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance77

Regular maintenance activity

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2a45fb465d05cafa46a49d77995ae65b2d7eef3c9c94f91367d56442173236a?d=identicon)[info@lqd.cz](/maintainers/info@lqd.cz)

---

Top Contributors

[![petr6](https://avatars.githubusercontent.com/u/73128826?v=4)](https://github.com/petr6 "petr6 (8 commits)")

---

Tags

logdebugnettedevelopmenttracyViewer

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/liquiddesign-nette-log-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/liquiddesign-nette-log-viewer/health.svg)](https://phpackages.com/packages/liquiddesign-nette-log-viewer)
```

###  Alternatives

[spatie/laravel-tail

Easily tail application logs

7592.5M4](/packages/spatie-laravel-tail)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k6](/packages/inpsyde-wonolog)[jackiedo/log-reader

An easy log reader and management tool for Laravel

151376.5k4](/packages/jackiedo-log-reader)[contributte/newrelic

NewRelic PHP agent integration for Nette Framework

19822.4k](/packages/contributte-newrelic)[achyutn/filament-log-viewer

A Filament package to view and manage Laravel logs.

4497.9k30](/packages/achyutn-filament-log-viewer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
