PHPackages                             syonix/monolog-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. syonix/monolog-viewer

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

syonix/monolog-viewer
=====================

An easy-to-use viewer for log files generated by Monolog (https://github.com/Seldaek/monolog)

v4.0.2(10y ago)2756.1k63[27 issues](https://github.com/Syonix/monolog-viewer/issues)[5 PRs](https://github.com/Syonix/monolog-viewer/pulls)GPL-2.0CSSPHP &gt;=5.4

Since Jan 4Pushed 4y ago10 watchersCompare

[ Source](https://github.com/Syonix/monolog-viewer)[ Packagist](https://packagist.org/packages/syonix/monolog-viewer)[ Docs](https://github.com/Syonix/monolog-viewer)[ RSS](/packages/syonix-monolog-viewer/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (12)Versions (13)Used By (0)

Monolog Viewer
==============

[](#monolog-viewer)

[![Build Status](https://camo.githubusercontent.com/2afdb10383a7b24670c7c9250c86a6a50316d799681170de654146e09db81e96/68747470733a2f2f7472617669732d63692e6f72672f53796f6e69782f6d6f6e6f6c6f672d7669657765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Syonix/monolog-viewer)[![Total Downloads](https://camo.githubusercontent.com/44b0617b649f13fdaf9cc022ff013c5e081ad4e64bcad3bd86739f6cf4826fa6/68747470733a2f2f706f7365722e707567782e6f72672f73796f6e69782f6d6f6e6f6c6f672d7669657765722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/syonix/monolog-viewer)[![Latest Stable Version](https://camo.githubusercontent.com/fdcf789c66287557ff2548ca99fdc63726137756755a1e37a99f3ca1d098c89c/68747470733a2f2f706f7365722e707567782e6f72672f73796f6e69782f6d6f6e6f6c6f672d7669657765722f762f737461626c652e706e67)](https://packagist.org/packages/syonix/monolog-viewer)[![SensioLabsInsight](https://camo.githubusercontent.com/5d3164f44101f014e5052f70321521ea68ef6ad7a161689a12683d92c262ea6a/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63323265386337642d633534332d346535362d386631302d6164323463613134383539662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/c22e8c7d-c543-4e56-8f10-ad24ca14859f)

A viewer to nicely display log files generated by [Monolog](https://github.com/Seldaek/monolog).

[![Screenshot](https://github.com/Syonix/monolog-viewer/raw/master/web/img/screenshot.png)](#installation)*[Mockup Credits](https://dribbble.com/shots/994811-Apple-pack)*

Installation &amp; Setup
========================

[](#installation--setup)

1. Download [Composer](http://getcomposer.org/)
2. Execute `php composer.phar create-project syonix/monolog-viewer install-directory/` (make sure to replace `install-directory` with the name of the directory you want to install monolg viewer into.
3. Upload the files to your webspace
4. Make sure PHP has write access to the directory `/app/config/secure` - This is where the password hash will be stored (see [below](#password-management)). Write access can be achieved by either changing the folder's chmod to 777 (less secure) or making sure that the owner of the file is the same as the one the server is using.
5. Create a configuration file (rename or copy the `config_example.yaml`).
6. Open Monolog Viewer in the browser
7. Enter a password of your choice twice and click "Create login".
8. Done. You can now log in and use your installation of Monolog Viewer

MonologViewer requires PHP 5.5 or higher. If you are using Apache, make sure to enable the `mod_rewrite` module.

For configuration under nginx please refer to [issue #14](https://github.com/Syonix/monolog-viewer/issues/14)

Configuration
=============

[](#configuration)

The config file is a YAML file containing the paths to your log files. Log files can be grouped. These groups are called clients, but you could also see them as sites or whatever makes sense to you.

To set up log files, make sure to fill in the config file following this structure:

```
debug: false
timezone: "Europe/Zurich"
dateFormat: d.m.Y, H:i:s
logs:
    Demo:
        Demo-Log-File:
            type: local
            path: /path/to/your/monolog-viewer/installation/test/SyonixLogViewer/res/test.log
    Acme:
        Acme App:
            type: ftp
            host: acme.com
            username: logs
            password: $upersecur3
            path: app/logs/prod.log
```

The field `type` determines how the app will try to access the log file. For this, [Flysystem](http://flysystem.thephpleague.com/) is used. Currently implemented are `local` and `ftp`, but any other Flysystem Adapter can easily be added to the `Syonix\LogViewer\LogFile.php` constructor. Feel free to contribute.

**Note:** If your `config.yaml` is invalid, Monolog Viewer will display an error message. Also, if a client does not contain any logs, the client will not be listed in the navigation. If your config file is invalid and you don't know why, check if [there are any tab characters in it](http://www.yaml.org/faq.html).

Configuration values
--------------------

[](#configuration-values)

The following configuration values are available:

NameTypeDescription`timezone``string`Timezone string according to [PHP Manual](http://php.net/manual/en/timezones.php).`date_format``string`Date format for log entries according to the [Angular JS Manual](https://docs.angularjs.org/api/ng/filter/date).`logs``array`List of all log files, categorized by "clients" (see above)`display_logger``boolean`Turn log channel (logger) display in log view on or off### Flysystem Types

[](#flysystem-types)

##### `local`

[](#local)

Accesses log files on the server's local file system.

Config valuesDescription`path`The absolute file path. (You can use PHP's `realpath()` to get the absolute path of a file.)##### `ftp`

[](#ftp)

Accesses log files via FTP.

Config valuesDescription`host`The host to connect to (e.g. `ftp.acme.com`)`username`The ftp user to connect with`password`The ftp user's password.`path`The file path, relative to the FTP user's root directory.`port`The port to use for connecting (optional, default: 21)`passive`Use a passive connection (optional, default: true)`ssl`Use an encrypted connection / FTP over SSL (optional, default: false)`timeout`The default timeout (optional, default: 30)##### `sftp`

[](#sftp)

Accesses log files via SFTP.

Config valuesDescription`host`The host to connect to (e.g. `ftp.acme.com`)`username`The ftp user to connect with`password`The ftp user's password.`port`The port to use for connecting (optional, default: 21)`passive`Use a passive connection (optional, default: true)`ssl`Use an encrypted connection / FTP over SSL (optional, default: false)`timeout`The default timeout (optional, default: 30)`private_key`Path to the client private key (optional, no default)##### All types

[](#all-types)

Config valuesDescription`pattern`A regex for a custom log line pattern.
For example if your log lines don't end in `[] {}` you could use `/\[(?P.*)\] (?P\w+).(?P\w+): (?P[^\[\{]+)/`Password management
===================

[](#password-management)

My goal was to keep this tool so simple, that it can be installed on any shared hosting. Therefore I decicded not to use a database to store the password. Instead it is saved within a folder that is protected by a `.htaccess` file and therefore not accessible by the public.

The only way to get the password hash is via FTP and even if someone gets the file, it is still hashed using PHPs `password_hash()` function. If you use a secure password, this is pretty safe.

Multiple users might be implemented in the future.

Change password
---------------

[](#change-password)

To change your password, simply delete the `/app/config/secure/passwd` file and open Monolog Viewer to set a new password.

Mobile devices
==============

[](#mobile-devices)

The App is fully optimized for tablets and smart phones and can even be installed to the home screen on iOS devices. It then works like a native app and features an app icon as well as a beautiful splash screen.

Enforcing HTTPS
===============

[](#enforcing-https)

This should be done on a server configuration level. You could for example add this to the `.htaccess` file, right below `RewriteEngine On`:

```
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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 ~247 days

Recently: every ~563 days

Total

12

Last Release

1793d ago

Major Versions

1.1.3 → 2.0.02014-08-22

2.0.0 → v3.0.02015-04-09

v3.1.1 → v4.0.02015-06-09

v4.0.2 → v5.x-dev2021-06-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab4040af9ad9c50643c83be0be008a751c14be693e6c4e1376b8de692e1f81ce?d=identicon)[syonix](/maintainers/syonix)

---

Top Contributors

[![mpbzh](https://avatars.githubusercontent.com/u/6039062?v=4)](https://github.com/mpbzh "mpbzh (113 commits)")[![BartoszBartniczak](https://avatars.githubusercontent.com/u/6022713?v=4)](https://github.com/BartoszBartniczak "BartoszBartniczak (2 commits)")[![coldwinds](https://avatars.githubusercontent.com/u/961027?v=4)](https://github.com/coldwinds "coldwinds (2 commits)")[![julkue](https://avatars.githubusercontent.com/u/8310677?v=4)](https://github.com/julkue "julkue (2 commits)")

---

Tags

logloggingmonologViewer

### Embed Badge

![Health badge](/badges/syonix-monolog-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/syonix-monolog-viewer/health.svg)](https://phpackages.com/packages/syonix-monolog-viewer)
```

###  Alternatives

[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k6](/packages/inpsyde-wonolog)[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)[inpsyde/logzio-monolog

Logz.io integration for Monolog

191.2M1](/packages/inpsyde-logzio-monolog)[mero/yii2-monolog

The Monolog integration for the Yii framework.

42186.1k](/packages/mero-yii2-monolog)[mero/telegram-handler

Monolog handler to send log by Telegram

36113.3k](/packages/mero-telegram-handler)[lefuturiste/monolog-discord-handler

A simple monolog handler for support Discord webhooks

34111.6k4](/packages/lefuturiste-monolog-discord-handler)

PHPackages © 2026

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