PHPackages                             bloatless/pile - 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. bloatless/pile

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

bloatless/pile
==============

Dead simple centralized logging.

v0.3.4(2y ago)322MITPHPPHP ^8.0

Since Nov 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bloatless/pile)[ Packagist](https://packagist.org/packages/bloatless/pile)[ Docs](https://bloatless.org)[ RSS](/packages/bloatless-pile/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (8)Dependencies (1)Versions (7)Used By (0)

 [![](https://camo.githubusercontent.com/c32f73a2d2e53972aa4187a1ffa7e720e107f2a72a7a1f1e4e4a8737eab4338e/68747470733a2f2f626c6f61746c6573732e6f72672f696d672f6c6f676f2e737667)](https://camo.githubusercontent.com/c32f73a2d2e53972aa4187a1ffa7e720e107f2a72a7a1f1e4e4a8737eab4338e/68747470733a2f2f626c6f61746c6573732e6f72672f696d672f6c6f676f2e737667)

Pile
====

[](#pile)

 Dead simple centralized logging.

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

[](#installation)

To install Pile just clone this repository to your server:

```
git clone https://github.com/bloatless/pile.git

```

- Point your virtual host document root to the `public` directory and rewrite ald requests to the `index.php` file.
- Create a new MySQL database and import the structure using the `db_stucture.sql` file.
- Copy `config/config.sample.php` to `config/config.php` and adjust database configuration, api-keys and user-account settings.

Documentation
-------------

[](#documentation)

### Log message structure

[](#log-message-structure)

The general structure of a log message to be send to the Pile API should be as follows:

keytypedescriptionsource¹stringAn identifier describing the source of the log message. (e.g. the project name)message¹stringThe actual log message.level¹intA valid log level code. (See listing below)contextarrayArbitrary data passed together with the log message.channelstringThe channel this message was logged to.datetimestringDate and time when the message was logged. (Format: YYYY-MM-DD HH:ii:ss)extraarrayAdditional data added by the processor.¹ = field is required

#### Log levels

[](#log-levels)

Valid log level codes are:

codelevel name100debug200info250notice300warning400error500critical550alert600emergency### Sending logs to your Pile instance

[](#sending-logs-to-your-pile-instance)

#### Using HTTP REST API

[](#using-http-rest-api)

Log messages can be sent to your Pile instance using a simple post request:

```
POST https://pile.yourdomain.com/api/v1/log
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-API-Key: 123123123

{
    "data": {
        "type": "log",
        "attributes": {
            "source": "MyProjectName",
            "message": "Some error occoured",
            "context": {
                "exception": {
                    "class": "My\\Fancy\\Classname",
                    "message": "Invalid value",
                    "code": "42",
                    "file": "\/framework\/src\/Foo\/Bar\/Classname.php:1337"
                }
            },
            "level": 400,
            "level_name": "ERROR",
            "channel": "dev",
            "datetime": "2019-11-05 17:44:26",
            "extra": []
        }
    }
}

```

Be sure to include an API key within the request header.

#### Using Monolog Handler

[](#using-monolog-handler)

If you are using [Monolog](http://github.com/Seldaek/monolog) in your project you can also use the [MonoPile](https://github.com/bloatless/MonoPile) package which provides a handler and formatter for Monolog to easily send error-logs to your Pile instance.

### Cleanup

[](#cleanup)

Old log entries can be regularly deleted using the cleanup script:

`php cli/cleanup.php`

This will delete old log entries from the database. The "lifetime" of log entries can be configured within the `config/config.php` file.

It is recommended to regularly call the cleanup script using a cronjob.

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.1% 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 ~260 days

Recently: every ~126 days

Total

7

Last Release

804d ago

PHP version history (2 changes)v0.1PHP ^7.2

v0.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b671374dc6bed0be4c509ea43a89583701957a7f46d7562a8122f66ac372c5b?d=identicon)[nekudo](/maintainers/nekudo)

---

Top Contributors

[![nekudo](https://avatars.githubusercontent.com/u/1132928?v=4)](https://github.com/nekudo "nekudo (33 commits)")[![yroak](https://avatars.githubusercontent.com/u/142504359?v=4)](https://github.com/yroak "yroak (1 commits)")

---

Tags

phploggingcentralized

### Embed Badge

![Health badge](/badges/bloatless-pile/health.svg)

```
[![Health](https://phpackages.com/badges/bloatless-pile/health.svg)](https://phpackages.com/packages/bloatless-pile)
```

###  Alternatives

[hedii/laravel-gelf-logger

A Laravel package to send logs to a gelf compatible backend like graylog

1333.4M10](/packages/hedii-laravel-gelf-logger)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)

PHPackages © 2026

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