PHPackages                             bufferpunk/logmachine - 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. bufferpunk/logmachine

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

bufferpunk/logmachine
=====================

Logmachine is a collaborative and visually elegant logging tool designed to make logging smarter and more efficient for distributed development teams. It offers a fully pluggable architecture that supports features like color-coded output for better readability, automatic JSON parsing, structured log forwarding via HTTP or Socket.IO, and centralized log management. Whether you're debugging locally or working across services, logmachine brings clarity and flexibility to your logging workflow.

11↓90.9%1PHPCI passing

Since Apr 2Pushed 2w ago1 watchersCompare

[ Source](https://github.com/logmachine/php)[ Packagist](https://packagist.org/packages/bufferpunk/logmachine)[ RSS](/packages/bufferpunk-logmachine/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependenciesVersions (3)Used By (0)

LogMachine PHP
==============

[](#logmachine-php)

A powerful structured logging package for PHP applications. It provides colored console output, structured log formatting, and optional log forwarding via HTTP or WebSockets to a remote LogMachine server.

Why LogMachine?
---------------

[](#why-logmachine)

If you’ve used plain `error_log()` or even Monolog, you know logs can quickly become hard to scan, messy to parse, and painful to centralize. LogMachine solves this with:

FeatureWhy it matters**Color-coded CLI logs**Spot warnings and errors instantly in your terminal.**Structured JSON output**Easy to pipe into ELK, Loki, or any log processor.**Remote forwarding**Ship logs to your log server without extra setup.**Automatic context enrichment**No more boilerplate for `user` and `module`.**PSR-friendly**Works standalone or integrates with Monolog.**Small footprint**No heavy dependencies — drop it in and go.### CLI Output Example (colored):

[](#cli-output-example-colored)

```
[2025-08-08 14:32:00 UTC] [DEBUG] Debug message
➢ Log provided by: username@room
[2025-08-08 14:32:01 UTC] [INFO]  User logged in  {"user":"jdoe"}
➢ Log provided by: username@room
[2025-08-08 14:32:02 UTC] [WARNING] API rate limit approaching
➢ Log provided by: username@room
[2025-08-08 14:32:03 UTC] [ERROR]  	Database connection failed  {"host":"localhost"}
➢ Log provided by: username@room
```

Compatibility
-------------

[](#compatibility)

This package is compatible with PHP v8.3.6 and above

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require bufferpunk/logmachine

or

composer require bufferpunk/logmachine dev-main

or

composer require bufferpunk/logmachine dev-main --ignore-platform-req=ext-mbstring
```

: Additional steps (Important)
- create config directory

```
mkdir config
```

- create a config file

```
touch config/logmachine.php
```

- copy paste this to your logmachine.php file, then save:

```
