PHPackages                             lordoffreak/elastica-logzio - 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. lordoffreak/elastica-logzio

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

lordoffreak/elastica-logzio
===========================

PHP client to save realtime logs to Logz.io

1.0.3(7y ago)13.6k2[1 issues](https://github.com/lordoffreaks/elastica-logzio/issues)1MITPHPPHP &gt;=5.6.4 || ^7.1

Since Aug 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/lordoffreaks/elastica-logzio)[ Packagist](https://packagist.org/packages/lordoffreak/elastica-logzio)[ RSS](/packages/lordoffreak-elastica-logzio/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (3)Versions (5)Used By (1)

PHP Logz.io Logger
==================

[](#php-logzio-logger)

PHP library to send realtime logs to Logz.io, an ELK as a service.

### Installing

[](#installing)

Install with composer:

```
$ composer require lordoffreak/elastica-logzio
```

### Usage

[](#usage)

First of all, you need an account on Logz.io. Then, go to you profile settings and get your api key (token).

#### Configure

[](#configure)

To configure the library, you just need to get an instance of `LogzIO\Transport\LogzIOGuzzle`, set the `token` and the the `type`. You need to do it once per Transport. After that create an instance of `LogzIO\LogzIOElasticaClient` and use it as a normal `Elastica\Client` client.

```
setToken('YOUR_API_KEY');
$config['transport']->setType('record');

$client = new LogzIOElasticaClient($config);
```

#### Sending logs

[](#sending-logs)

To send a log, you need to get an instance of `LogzIO\LogzIOElasticaClient` and use it as a normal `Elastica\Client` client:

```
setToken('YOUR_API_KEY');
$config['transport']->setType('record');

$client = new LogzIOElasticaClient($config);
$data = [
    'name' => 'Alejandro',
    'surname' => 'Tabares',
];

// First parameter is the id of document.
$documents = [
    new \Elastica\Document($id, $data)
];

$resp = $client->addDocuments([$documents);
```

#### Usage with Monolog

[](#usage-with-monolog)

As described in  just:

```
setToken('YOUR_API_KEY');
$config['transport']->setType($type);

$client = new LogzIOElasticaClient($config);

$options = array(
    'index' => 'YOUR_INDEX_NAME',
    'type' => $type,
);

$handler = new ElasticSearchHandler($client, $options);
$log = new Logger('application');
$log->pushHandler($handler);
```

### Contributing

[](#contributing)

To contribute, create a fork, make your changes, make tests, test and create a PR.

### License

[](#license)

This library is licenced under MIT.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 76.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 ~125 days

Total

4

Last Release

2862d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4 || ^7.0

1.0.2PHP &gt;=5.6.4 || ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/43fc8bd773f78a9dc92c563688049de72f794cbf312d56ce8219a3d0262db0ca?d=identicon)[lord\_of\_freaks](/maintainers/lord_of_freaks)

---

Top Contributors

[![lordoffreaks](https://avatars.githubusercontent.com/u/953337?v=4)](https://github.com/lordoffreaks "lordoffreaks (10 commits)")[![chemiu-mipo](https://avatars.githubusercontent.com/u/67308467?v=4)](https://github.com/chemiu-mipo "chemiu-mipo (2 commits)")[![vmanyushin](https://avatars.githubusercontent.com/u/2026440?v=4)](https://github.com/vmanyushin "vmanyushin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lordoffreak-elastica-logzio/health.svg)

```
[![Health](https://phpackages.com/badges/lordoffreak-elastica-logzio/health.svg)](https://phpackages.com/packages/lordoffreak-elastica-logzio)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

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