PHPackages                             kibilog/php-client - 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. kibilog/php-client

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

kibilog/php-client
==================

An independent client for Kibilog.com, running on native code.

v1.0.1(4y ago)149MITPHPPHP &gt;=7.1

Since Oct 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kibilog/php-client)[ Packagist](https://packagist.org/packages/kibilog/php-client)[ Docs](https://kibilog.com)[ RSS](/packages/kibilog-php-client/feed)WikiDiscussions master Synced 4w ago

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

The library is a client for working with Kibilog.com
----------------------------------------------------

[](#the-library-is-a-client-for-working-with-kibilogcom)

> The client works without cUrl. To work, it is necessary that in php.ini there is a setting allow\_url\_fopen = 1

[Detailed examples](https://github.com/kibilog/php-client/tree/master/example)

Example:
--------

[](#example)

```
use Kibilog\SimpleClient\Fallback\Adapter\FilesystemAdapter;
use Kibilog\SimpleClient\HttpClient;
use Kibilog\SimpleClient\Message;

/**
 * Initializing the client.
 */
$sUserToken = '01fdeleozya3fwa1nwy9b2w034';
$oClient = new HttpClient($sUserToken);

/**
 * Set timeout connection.
 * Default 2 seconds.
 * Optional.
 */
$oClient->setHttpTimeout(5);

/**
 * Fallback is designed not to lose data in case
 *   of network problems or service availability.
 * Optional.
 */
$oClient->setFallback(
    new FilesystemAdapter(dirname($_SERVER['DOCUMENT_ROOT']).'/kibilogFallback')
);

/**
 * If the program crashes, we will try to send
 *   all the collected messages.
 * Optional.
 */
register_shutdown_function(function () use ($oClient)
    {
        $oClient->sendMessages();
    }
);

// As an example, let's go through the files and try to convert them.
$sDir = $_SERVER['DOCUMENT_ROOT'].'/images/';
$aFiles = glob($sDir.'*');
foreach ($aFiles as $sFile) {
    $sFilepath = $sDir.$sFile;
    $iTime = microtime();

    $sLogUlid = '01fjqbwk1heyv50z99hkg7m6ky';

    /**
     * If we need to group messages (as part of this example, grouping messages within the
     *   framework of working with a single file), we need to form a message group value.
     * The group value must be UUID version 4.
     */
    $sUuidIteration = \Kibilog\SimpleClient\Assistent\Uuid::v4();

    $oMessage = (new Message\Monolog(
        $sLogUlid,
        'Starting processing the file "'.$sFile.'".'
    ))
        /**
         * By default, time(). It is set automatically during creation.
         * It makes sense to set when transmitting messages with a timestamp (for example, nginx log).
         * There must be a timestamp with UTC timezone.
         * Optional.
         */
        ->setCreatedAt(time())
        /**
         * If necessary, additional parameters can be registered to form an
         *   array with scalar values.
         * Optional.
         */
        ->setParams(
            [
                'createdAt' => date("F d Y H:i:s.", filemtime($sFilepath)),
                'filesize' => round($sFilepath / 1024, 3)
            ]
        )
        /**
         * Log entry level according to RFC 5424 standard.
         * Optional. By default INFO.
         */
        ->setLevel(Message\Monolog::LEVEL_INFO)
        /**
         * A group of messages.
         * Optional.
         */
        ->setGroup($sUuidIteration);
    /**
     * Let's add the message to the collection.
     */
    $oClient->addMessage($oMessage);

    try {
        if (filesize($sFilepath) < 1024) {
            $oClient->addMessage(
                (new Message\Monolog(
                    $sLogUlid,
                    'The image is suspiciously small. Let\'s skip it.'
                ))
                    ->setGroup($sUuidIteration)
                    ->setGroup(Message\Monolog::LEVEL_WARNING)
            );
        }

        // Some kind of logic
        // ...

        $oMessage = null;
        if ($isResultSuccess) {
            $oMessage = (new Message\Monolog(
                $sLogUlid,
                'Done'
            ));
        } else {
            $oMessage = (new Message\Monolog(
                $sLogUlid,
                'Error'
            ))->setLevel(Message\Monolog::LEVEL_ERROR);
        }

        $oMessage
            ->setGroup($sUuidIteration)
            ->setParams([
                'executeTime' => round(microtime() - $iTime, 4)
            ]);
        $oClient->addMessage($oMessage);
    } catch (\Throwable $e) {
        $oClient->addMessage(
            (new Message\Monolog(
                $sLogUlid,
                'Exception: '.$e->getMessage()
            ))
                ->setParams(
                    [
                        'trace' => array_map(function ($v)
                            {
                                return (!empty($v['class']) ? $v['class'].'->' : '')
                                       .implode(
                                           ' ',
                                           [
                                               $v['function'].'()',
                                               'IN',
                                               $v['file'],
                                               $v['line']
                                           ]
                                       );
                            }, $e->getTrace())
                    ]
                )
                ->setLevel(Message\Monolog::LEVEL_CRITICAL)
        );
    }
    finally {
        /**
         * We will send the collected messages.
         * After sending, the internal collection will be reset and it
         *   can be reassembled.
         * Important: You can add messages to the collection that are
         *   intended for different logs (with different гдшв). In fact,
         *   it's even better - by sending messages in large groups, you
         *   save time on the connection.
         * But it should be understood that collecting a large number of
         *   messages consumes RAM, so find a balance so as not to get a
         *   leak of RAM.
         */
        $oClient->sendMessages();
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

4

Last Release

1652d ago

Major Versions

v0.2 → v1.0.02021-10-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/974b4d281f579d72c8d68ed4c64151cebf455c113b41c7ffae3072eb8cf42808?d=identicon)[Kibilog](/maintainers/Kibilog)

---

Top Contributors

[![kibilog](https://avatars.githubusercontent.com/u/93047300?v=4)](https://github.com/kibilog "kibilog (8 commits)")

---

Tags

logloggingmonologkibilog

### Embed Badge

![Health badge](/badges/kibilog-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/kibilog-php-client/health.svg)](https://phpackages.com/packages/kibilog-php-client)
```

###  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)
