PHPackages                             ami-praha/ai-logger - 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. ami-praha/ai-logger

ActiveLibrary

ami-praha/ai-logger
===================

A Laravel package that provides a logging driver to send logs to a specified external webhook.

v0.0.17(1y ago)12.3k↓50%MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3

Since Mar 18Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/AMI-Praha-a-s/ai-logger)[ Packagist](https://packagist.org/packages/ami-praha/ai-logger)[ RSS](/packages/ami-praha-ai-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (19)Used By (0)

AI Logger
=========

[](#ai-logger)

Repository
----------

[](#repository)

**ami-praha/ai-logger**
**Description:** A Laravel package providing a logging channel that sends log messages to an external webhook.

Overview
--------

[](#overview)

This package adds a custom Laravel logging channel called `ai-logger`. When used, it sends log messages (and context data) as JSON payloads to a configured webhook URL.

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

[](#installation)

Require the package via Composer:

```
composer require ami-praha/ai-logger:"0.0.*"
```

No further configuration file publishing is necessary.

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

[](#configuration)

### Environment Variable

[](#environment-variable)

Set the webhook URL in your application's `.env` file:

```
AI_LOGGER_WEBHOOK_URL="http://ai-logger.test/api/receive"
AI_LOGGER_SOURCE_CODE="EXAMPLEAPP"
AI_LOGGER_SOURCE_NAME="Example App"
AI_LOGGER_SOURCE_URL="http://example-app.test"
AI_LOGGER_SOURCE_GIT_PROJECT_OWNER="EXP"
AI_LOGGER_SOURCE_GIT_PROJECT_NAME="example_app"
AI_LOGGER_SOURCE_JIRA_PROJECT_CODE="EXPAPP"
AI_LOGGER_SOURCE_JIRA_PARENT_PROJECT_KEY="EXPAPP-123"
```

### Configuring Logging Channel

[](#configuring-logging-channel)

In Laravel's `config/logging.php`, add a new channel `ai-logger`. Also if you are using a `stack` channel and want to automatically send any logs to `ai-logger` (recommended), add it to `stack.channels` array:

```
// config/logging.php
return [
    'default' => env('LOG_CHANNEL', 'stack'),

    'channels' => [
        // other channels...

        'stack' => [
            'driver' => 'stack',
            'channels' => ['single', 'slack', 'ai-logger'],
        ],

        'ai-logger' => [
            'driver' => 'ai-logger',
            'webhookUrl' => env('AI_LOGGER_WEBHOOK_URL'),
            'sourceCode' => env('AI_LOGGER_SOURCE_CODE'),
            'sourceName' => env('AI_LOGGER_SOURCE_NAME'),
            'sourceUrl' => env('AI_LOGGER_SOURCE_URL'),
            'sourceGitProjectOwner' => env('AI_LOGGER_SOURCE_GIT_PROJECT_OWNER'),
            'sourceGitProjectName' => env('AI_LOGGER_SOURCE_GIT_PROJECT_NAME'),
            'sourceJiraProjectCode' => env('AI_LOGGER_SOURCE_JIRA_PROJECT_CODE'),
            'sourceJiraParentProjectKey' => env('AI_LOGGER_SOURCE_JIRA_PARENT_PROJECT_KEY'),
            'level' => 'warning',
        ],
    ],
];
```

Usage
-----

[](#usage)

To log using AI Logger, specify the `ai-logger` channel in your code:

```
use Illuminate\Support\Facades\Log;

Log::channel('ai-logger')->info('Hello from AI Logger', ['extra_data' => 'test']);

// Other log levels work similarly
Log::channel('ai-logger')->error('Something went wrong.', [
    'exception' => 'Some exception info',
]);
```

This will send the log message, context data, log level, and timestamp as a JSON payload to the configured webhook URL.

Verifying Functionality
-----------------------

[](#verifying-functionality)

1. **Set up a Test Webhook**: Use tools like [Webhook.site](https://webhook.site) or RequestBin to create a temporary webhook endpoint.
2. **Trigger a Log**: Execute a log statement:

    ```
    Log::channel('ai-logger')->info('Testing AI Logger');
    ```
3. **Inspect Received Payload**: Confirm the JSON payload arrives at your test webhook.

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

[](#requirements)

- **PHP:** `^7.4 | ^8.0 | ^8.1 | ^8.2 | ^8.3`
- **Laravel:** `^8.0 | ^9.0 | ^10.0 | ^11.0 | ^12.0`

Contributing
------------

[](#contributing)

Contributions are welcome!

1. Fork and create a feature branch.
2. Submit your changes through a Pull Request.
3. Provide a clear description of your updates.

For bugs or feature requests, please create an issue on GitHub.

License
-------

[](#license)

Licensed under the **MIT License**.

---

Thank you for using **AI Logger**! If you have questions, open an issue on GitHub or contact the maintainer.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance55

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.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 ~3 days

Total

17

Last Release

369d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d45ab5a4ad71dfe6e6c93f8b2735aceea7ca59361d6b4b3e5835f46443b3d5b2?d=identicon)[AmiPraha](/maintainers/AmiPraha)

---

Top Contributors

[![desthercz](https://avatars.githubusercontent.com/u/25509616?v=4)](https://github.com/desthercz "desthercz (22 commits)")[![AmiPraha](https://avatars.githubusercontent.com/u/77406341?v=4)](https://github.com/AmiPraha "AmiPraha (1 commits)")

### Embed Badge

![Health badge](/badges/ami-praha-ai-logger/health.svg)

```
[![Health](https://phpackages.com/badges/ami-praha-ai-logger/health.svg)](https://phpackages.com/packages/ami-praha-ai-logger)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.2M](/packages/honeybadger-io-honeybadger-laravel)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)

PHPackages © 2026

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