PHPackages                             joppedc/logsnag-php-sdk - 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. joppedc/logsnag-php-sdk

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

joppedc/logsnag-php-sdk
=======================

An integration of the Logsnag API for PHP

v1.0.2(3y ago)66.3k↓61.2%MITPHPPHP ^7.4 || ^8.0

Since Apr 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JoppeDC/LogSnag-PHP-SDK)[ Packagist](https://packagist.org/packages/joppedc/logsnag-php-sdk)[ RSS](/packages/joppedc-logsnag-php-sdk/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (9)Versions (8)Used By (0)

 [ ![LogSnag](https://camo.githubusercontent.com/4433ac136a78f2945c7ae65f655f36dee1580784685ba75d7036c8233a2370de/68747470733a2f2f6c6f67736e61672e636f6d2f5f6e6578742f7374617469632f6d656469612f6c6f676f2d746578742e63396533336632632e737667) ](https://logsnag.com/?utm_source=github/joppedc-logsnag-php-sdk&utm_medium=logo)*Realtime monitoring, for your entire business. A [LogSnag](https://logsnag.com/?utm_source=github/joppedc-logsnag-php-sdk&utm_medium=logo) PHP SDK.*

 [![Latest Stable Version](https://camo.githubusercontent.com/d0fab0a365dffb0579bd7c55a13c34b18fc8523c995ac25657d500b83701d3ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f70706564632f6c6f67736e61672d7068702d73646b)](https://packagist.org/packages/joppedc/logsnag-php-sdk) [![Test](https://github.com/JoppeDC/LogSnag-PHP-SDK/workflows/CI/badge.svg)](https://github.com/JoppeDC/LogSnag-PHP-SDK/actions) [![License](https://camo.githubusercontent.com/221ae99f391396653ec4cf4158e721ec628894184f54dd612610bb095a02125c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c)](https://github.com/JoppeDC/LogSnag-PHP-SDK/blob/main/LICENSE)

Unofficial PHP SDK
==================

[](#unofficial-php-sdk)

Getting started
---------------

[](#getting-started)

### Install

[](#install)

To install the SDK you will need to be using Composer in your project. To install it please see the [composer docs](https://getcomposer.org/download/).

This is the "core" SDK, meaning that all the core logic and models are here. If you are happy with using your own HTTP client, install the SDK like: [`joppedc/logsnag-php-sdk`](https://github.com/JoppeDC/LogSnag-PHP-SDK)

```
composer require joppedc/logsnag-php-sdk
```

This package (`joppedc/logsnag-php-sdk`) is not tied to any specific library that sends HTTP messages. Instead, it uses [Httplug](https://github.com/php-http/httplug) to let users choose whichever PSR-7 implementation and HTTP client they want to use.

If you just want to get started quickly you should run the following command:

```
composer require joppedc/logsnag-php-sdk php-http/curl-client
```

This will install the library itself along with an HTTP client adapter that uses cURL as transport method (provided by Httplug). You do not have to use those packages if you do not want to. The SDK does not care about which transport method you want to use because it's an implementation detail of your application.

### Configuration

[](#configuration)

```
new JoppeDc\LogsnagPhpSdk\Client("your_secret_key");
```

### Usage

[](#usage)

#### Create new log event

[](#create-new-log-event)

```
$payload = new JoppeDc\LogsnagPhpSdk\Contracts\LogPayload(
    'project_name',
    'channel_name',
    'event_name'
);

$payload->setDescription('test-description');
$payload->setTags(['tag' => 'tag value']);
$payload->setIcon('😀');

$log = $this->client->createLog($payload);
```

#### Create new insight event

[](#create-new-insight-event)

```
$payload = new JoppeDc\LogsnagPhpSdk\Contracts\InsightPayload(
    'project_name',
    'title',
    5
);

$payload->setIcon('😀');

$insight = $this->client->createInsight($payload);
```

#### Mutate an insight event

[](#mutate-an-insight-event)

```
$payload = new JoppeDc\LogsnagPhpSdk\Contracts\MutateInsightPayload(
    'project_name',
    'title',
    -5
);

$payload->setIcon('😀');

$insight = $this->client->mutateInsight($payload);
```

Special thanks
--------------

[](#special-thanks)

- [Logsnag](https://docs.logsnag.com)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~2 days

Total

3

Last Release

1181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e3b76cef7dfbd8d852cf99cdd7d6038a98a494c020df1dadc7c8abe1a6a66a7?d=identicon)[JoppeDC](/maintainers/JoppeDC)

---

Top Contributors

[![JoppeDC](https://avatars.githubusercontent.com/u/9723620?v=4)](https://github.com/JoppeDC "JoppeDC (6 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/joppedc-logsnag-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/joppedc-logsnag-php-sdk/health.svg)](https://phpackages.com/packages/joppedc-logsnag-php-sdk)
```

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M318](/packages/openai-php-client)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k17](/packages/anthropic-ai-sdk)[deeplcom/deepl-php

Official DeepL API Client Library

2607.3M113](/packages/deeplcom-deepl-php)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9067.8k](/packages/n1ebieski-ksef-php-client)[trycourier/courier

Courier PHP SDK

15660.9k](/packages/trycourier-courier)

PHPackages © 2026

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