PHPackages                             stechstudio/piton - 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. stechstudio/piton

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

stechstudio/piton
=================

PSR-3 Compatible Splunk Storm Logging

0.1.5(11y ago)027MITPHPPHP &gt;=5.4.0

Since Aug 22Pushed 11y ago5 watchersCompare

[ Source](https://github.com/stechstudio/Piton)[ Packagist](https://packagist.org/packages/stechstudio/piton)[ Docs](https://github.com/stechstudio/Piton)[ RSS](/packages/stechstudio-piton/feed)WikiDiscussions master Synced 1w ago

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

PITON
=====

[](#piton)

*The [PSR-3](http://www.php-fig.org/psr/psr-3/) Compliant [SplunkStorm](http://docs.splunk.com/Documentation/Storm/latest/User/AboutSplunkStorm) Logger for PHP*
----------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#the-psr-3-compliant-splunkstorm-logger-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/f26a672297af39d0e95e79056b3e6ba0ec16d2e3a31a2aa8c5e703145d85208c/68747470733a2f2f706f7365722e707567782e6f72672f737465636873747564696f2f7069746f6e2f762f737461626c652e737667)](https://packagist.org/packages/stechstudio/piton) [![Total Downloads](https://camo.githubusercontent.com/862b589e1d9c0a30ec6f3553cc68b7b3d14bea32df362bcb9201136e8243df4d/68747470733a2f2f706f7365722e707567782e6f72672f737465636873747564696f2f7069746f6e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/stechstudio/piton) [![Latest Unstable Version](https://camo.githubusercontent.com/7dd7a1ddeb10c9c87c1b6a10e5961843b72655e8d37e74047c1b99bf4f542e8f/68747470733a2f2f706f7365722e707567782e6f72672f737465636873747564696f2f7069746f6e2f762f756e737461626c652e737667)](https://packagist.org/packages/stechstudio/piton) [![License](https://camo.githubusercontent.com/083427d7e5cee7c15a3f298f9b3d2ea45c7ed859e923dd496f633ea959d56680/68747470733a2f2f706f7365722e707567782e6f72672f737465636873747564696f2f7069746f6e2f6c6963656e73652e737667)](https://packagist.org/packages/stechstudio/piton)

Piton was developed in order to allow simple access to the [SplunkStorm REST API](http://docs.splunk.com/Documentation/Storm/Storm/User/UseStormsRESTAPI) from PHP code. While we use the [SplunkStorm](http://docs.splunk.com/Documentation/Storm/latest/User/AboutSplunkStorm) log shippers for the majority of our applications, we ran into cases of short lived tasks, running on short lived EC2 instances, that didn't warrant setting up log shipping.

However, we did desire the ability to capture the logs on SplunkStorm. Because the majority of these tasks run on [Iron.io's](http://www.iron.io) [IronWorker](http://www.iron.io/worker) and are CLI based, we also desired the ability to log to the console. Thus, our logger ships with console and splunk appenders.

We also happen to think highly of the [PHP FIG](http://www.php-fig.org/) standards, and desire to meet them where possible. After writing the logger for ourselves, we decided others might want to leverage it to, and are releasing it into the wild.

**Build Status****Code Coverage****Master**[![Build Status](https://camo.githubusercontent.com/a4f009e2a1e39f98891190f2a45a854a6210021a3a252f8ca48eae99ae5601c0/68747470733a2f2f7472617669732d63692e6f72672f737465636873747564696f2f5069746f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/stechstudio/Piton)[![Coverage Status](https://camo.githubusercontent.com/0efe5b4749138e42d37e6708ea7c8aed765850d2426b7fcaee163bd9299a41ff/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f737465636873747564696f2f5069746f6e2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/stechstudio/Piton?branch=master)**Develop**[![Build Status](https://camo.githubusercontent.com/34cb68aefa66be6f2d94a9d3e0757ff2b2e913c84d5c6c50839297ebd07f2ed8/68747470733a2f2f7472617669732d63692e6f72672f737465636873747564696f2f5069746f6e2e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/stechstudio/Piton)[![Coverage Status](https://camo.githubusercontent.com/ac5581fb90b447baab5529f63946ce0fd6ab6d68334c818fe6bbbf0d69aaaf8f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f737465636873747564696f2f5069746f6e2f62616467652e706e673f6272616e63683d646576656c6f70)](https://coveralls.io/r/stechstudio/Piton?branch=develop)Installation / Usage
--------------------

[](#installation--usage)

1. Download the [`composer.phar`](https://getcomposer.org/composer.phar) executable or use the installer.

    ```
    $ curl -sS https://getcomposer.org/installer | php
    ```
2. Create a composer.json defining your dependencies. Note that this example is a short version for applications that are not meant to be published as packages themselves. To create libraries/packages please read the [documentation](http://getcomposer.org/doc/02-libraries.md).

    ```
    {
        "require": {
            "stechstudio/piton": ">=0.1.1"
        }
    }
    ```
3. Run Composer: `php composer.phar install`
4. Browse for more packages on [Packagist](https://packagist.org).

Documentations
--------------

[](#documentations)

Check out the [docs/api directory](https://github.com/stechstudio/Piton/tree/master/docs/api).

Examples
--------

[](#examples)

Check out the [examples directory](https://github.com/stechstudio/Piton/tree/master/examples).

Quickstart
----------

[](#quickstart)

You will need a SplunkStorm Project API Hostname, Project ID, and Access Token. You can find them in the data section of your SplunkStorm Project. Select *Data*, the *API*, and you will find everything you need.

```
$allAppenders = [
        'logger' => ['level' => 'info'],
        'appenders' => [
            'console' => [
                'target' => 'STDOUT',
                'class' => 'Piton\Appender\Console'
            ],
            'null' => ['class' => 'Piton\Appender\Null'],
            'splunk' => [
                'target' => 'api-fake.data.splunkstorm.com',
                'class' => 'Piton\Appender\SplunkStorm',
                'context' => [
                    'SplunkStorm' => [
                        'projectID' => 'SomeFakeProjectID',
                        'accessToken' => 'AnotherFakeAccessToken',
                        'apiVersion' => 1,
                        'apiEndpoint' => 'inputs/http',
                        'urlScheme' => 'https'
                    ]
                ]
            ]
        ]
    ];

$logger = new Logger($allAppenders);
$logger->setLevel('all');
$requireMessageFormat = '{TIMESTAMP} app="SimpleConsoleLogging" level="{LOGLEVEL}" file="{file}" line={line} class="{class}" msg="{MESSAGE}" ';
$logger->setAndEnableRequiredMessage($requireMessageFormat, true);

runLogMessages('Because we log to SplunkStorm, and we PWN our logs!', ['file'=>__FILE__,'class'=>__CLASS__, 'line'=>__LINE__]);

function runLogMessages($message, $context = array()){
    global $logger;

    $logger->fatal($message, $context);
    $logger->emergency($message, $context);
    $logger->alert($message, $context);
    $logger->critical($message, $context);
    $logger->error($message, $context);
    $logger->warning($message, $context);
    $logger->notice($message, $context);
    $logger->info($message, $context);
    $logger->debug($message, $context);
    $logger->trace($message, $context);
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.9% 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 ~1 days

Total

5

Last Release

4281d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/149445590?v=4)[bubba](/maintainers/bubba)[@bubba](https://github.com/bubba)

---

Top Contributors

[![bubba-h57](https://avatars.githubusercontent.com/u/603630?v=4)](https://github.com/bubba-h57 "bubba-h57 (46 commits)")[![V13Axel](https://avatars.githubusercontent.com/u/2779682?v=4)](https://github.com/V13Axel "V13Axel (3 commits)")

---

Tags

logpsr-3loggingloggersplunksplunkstorm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stechstudio-piton/health.svg)

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

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k964.9M7.0k](/packages/monolog-monolog)[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.9k7](/packages/inpsyde-wonolog)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)[amphp/log

Non-blocking logging for PHP based on Amp, Revolt, and Monolog.

402.6M70](/packages/amphp-log)

PHPackages © 2026

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