PHPackages                             alitvinenko/laravel-pachka-logging - 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. alitvinenko/laravel-pachka-logging

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

alitvinenko/laravel-pachka-logging
==================================

Send Laravel logs to Pachka messenger via webhook

v0.3.0(1mo ago)0374↓11.4%MITPHPPHP ^8.1CI passing

Since Apr 10Pushed 1mo agoCompare

[ Source](https://github.com/alitvinenko/laravel-pachka-logging)[ Packagist](https://packagist.org/packages/alitvinenko/laravel-pachka-logging)[ RSS](/packages/alitvinenko-laravel-pachka-logging/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

Laravel Pachka Logging
======================

[](#laravel-pachka-logging)

[![CI](https://github.com/alitvinenko/laravel-pachka-logging/actions/workflows/ci.yml/badge.svg)](https://github.com/alitvinenko/laravel-pachka-logging/actions/workflows/ci.yml)

Laravel package for sending logs to [Pachka](https://pachca.com) messenger via incoming webhook.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11 or 12
- Monolog 3.x

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

[](#installation)

```
composer require alitvinenko/laravel-pachka-logging
```

Configuration
-------------

[](#configuration)

### 1. Set up Pachka webhook

[](#1-set-up-pachka-webhook)

1. Open Pachka and go to the channel where you want to receive error notifications
2. Channel settings → Integrations → Add integration → Incoming webhook
3. Copy the webhook URL

### 2. Environment variables

[](#2-environment-variables)

```
PACHKA_LOGGER_WEBHOOK_URL=https://api.pachca.com/webhooks/incoming/YOUR_WEBHOOK_ID
```

Optional:

```
PACHKA_LOGGER_TEMPLATE=pachka-logging::standard
PACHKA_LOGGER_TIMEOUT=10
PACHKA_LOGGER_ASYNC=true
PACHKA_LOGGER_QUEUE_CONNECTION=redis
PACHKA_LOGGER_QUEUE=logs
```

### 3. Add logging channel

[](#3-add-logging-channel)

In `config/logging.php`:

```
'pachka' => [
    'driver' => 'custom',
    'via' => Pachka\Logging\PachkaLogger::class,
    'level' => 'error',
],
```

### 4. Enable the channel

[](#4-enable-the-channel)

As the default channel:

```
LOG_CHANNEL=pachka
```

Or add to a stack:

```
LOG_STACK=daily,pachka
```

Usage
-----

[](#usage)

Use standard Laravel logging — messages are sent to Pachka based on the configured level:

```
Log::error('Payment processing failed', ['order_id' => 123]);
Log::critical('Database connection lost');
```

Unhandled exceptions are captured automatically via Laravel's exception handler.

Async mode
----------

[](#async-mode)

By default, log messages are sent to Pachka synchronously, which blocks the application until the HTTP request completes. For production environments, you can enable async mode to send messages via Laravel Queue:

```
PACHKA_LOGGER_ASYNC=true
```

When async mode is enabled:

- Messages are formatted immediately (in the request context)
- HTTP requests to Pachka are sent by the queue worker in the background
- Failed deliveries are retried automatically (3 attempts with 10s and 30s backoff)
- Errors are logged to the `single` channel

### Queue configuration

[](#queue-configuration)

You can isolate Pachka log jobs from your main queue:

```
PACHKA_LOGGER_QUEUE_CONNECTION=redis
PACHKA_LOGGER_QUEUE=logs
```

Or configure per-channel in `config/logging.php`:

```
'pachka' => [
    'driver' => 'custom',
    'via' => Pachka\Logging\PachkaLogger::class,
    'level' => 'error',
    'async' => true,
    'queue_connection' => 'redis',
    'queue' => 'logs',
],
```

Make sure your queue worker is running:

```
php artisan queue:work redis --queue=logs
```

Message templates
-----------------

[](#message-templates)

Two built-in templates are available:

- `pachka-logging::standard` (default) — app name, environment, timestamp, call location, message and context as pretty-printed JSON
- `pachka-logging::minimal` — app name, level and message only

### Custom templates

[](#custom-templates)

Publish and edit the views, or create your own Blade template:

```
php artisan vendor:publish --tag=pachka-logger-views
```

```
PACHKA_LOGGER_TEMPLATE=your-custom-view-name
```

Available template variables:

- `$appName` — application name
- `$appEnv` — environment (production, staging, etc.)
- `$level_name` — log level (ERROR, WARNING, etc.)
- `$datetime` — Carbon instance with date/time
- `$message` — original log message
- `$context` — context array (Throwable instances are serialized to arrays with class, message, file and trace)
- `$extra` — extra data (URL, HTTP method, IP from WebProcessor; file, line, class, function from IntrospectionProcessor)
- `$formatted` — full formatted string with message and context

### Publishing config

[](#publishing-config)

```
php artisan vendor:publish --tag=pachka-logger-config
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance89

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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 ~2 days

Total

3

Last Release

57d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1942268?v=4)[Andrey Litvinenko](/maintainers/alitvinenko)[@alitvinenko](https://github.com/alitvinenko)

---

Top Contributors

[![alitvinenko](https://avatars.githubusercontent.com/u/1942268?v=4)](https://github.com/alitvinenko "alitvinenko (13 commits)")

---

Tags

laravelloggingwebhookmonologpachka

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/alitvinenko-laravel-pachka-logging/health.svg)

```
[![Health](https://phpackages.com/badges/alitvinenko-laravel-pachka-logging/health.svg)](https://phpackages.com/packages/alitvinenko-laravel-pachka-logging)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10822.5k](/packages/naoray-laravel-github-monolog)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1392.4k](/packages/shaffe-laravel-mail-log-channel)

PHPackages © 2026

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