PHPackages                             lichi/laravel-loki-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. lichi/laravel-loki-logging

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

lichi/laravel-loki-logging
==========================

Logging to Loki for Laravel (PHP 8)

04PHP

Since Aug 5Pushed 1y agoCompare

[ Source](https://github.com/IvanHunters/laravel-loki-logging)[ Packagist](https://packagist.org/packages/lichi/laravel-loki-logging)[ RSS](/packages/lichi-laravel-loki-logging/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Loki Logging
====================

[](#laravel-loki-logging)

*Logging to Loki for Laravel*
*Fork *

Usage
-----

[](#usage)

1. Install this package: `composer require elgibor-solution/laravel-loki-logging`
2. Publish the configuration: `php artisan vendor:publish --provider=ESolution\\LaravelLokiLogging\\L3ServiceProvider`
3. Create a new log channel in `config/logging.php`: ```
    'loki' => [
      'driver' => 'monolog',
      'handler' => L3Logger::class,
    ]
    ```
4. Configure at least the `LOG_CHANNEL`, `LOG_USERNAME` and `LOG_PASSWORD`
    1. Ensure `APP_NAME` is configured appropriately. If this value cannot be changed, use `LOG_APP`.
    2. Optionally configure `LOG_SERVER` and `LOG_FORMAT`
5. Configure the `loki:persist` job to run periodically in your schedule. We recommend every minute, but feel free to reduce this.
6. `Log::info('Hello Loki!');`

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

[](#configuration)

The behaviour of the logger can be adjusted with the config options below.

KeyDescriptionDefault`context`Extra variables to be added as labels to the message. Variable substitutions are available.`application`: `env('LOG_APPLICATION')`
`type`: `'{level_name}'``format`How log messages should be formatted. Variable substitutions are available.`[{level_name}] {message}``loki.server`The loki server to which data should be logged.`https:///loki``loki.username`Username for HTTP basic authentication, can be left empty.Env-variable `LOG_USERNAME``loki.password`Password for HTTP basic authentication, can be left empty.Env-variable `LOG_PASSWORD`

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dc90dea0af427c7501b6494809381ce8716670db9d448dc890b3056b5bb3033?d=identicon)[Lichi](/maintainers/Lichi)

---

Top Contributors

[![rdemorais](https://avatars.githubusercontent.com/u/4343744?v=4)](https://github.com/rdemorais "rdemorais (8 commits)")[![IvanHunters](https://avatars.githubusercontent.com/u/49371933?v=4)](https://github.com/IvanHunters "IvanHunters (5 commits)")[![CerebralFart](https://avatars.githubusercontent.com/u/11133931?v=4)](https://github.com/CerebralFart "CerebralFart (3 commits)")[![devig](https://avatars.githubusercontent.com/u/2635075?v=4)](https://github.com/devig "devig (2 commits)")[![janblahawebsta](https://avatars.githubusercontent.com/u/85996165?v=4)](https://github.com/janblahawebsta "janblahawebsta (2 commits)")[![elgibor-solution](https://avatars.githubusercontent.com/u/783039?v=4)](https://github.com/elgibor-solution "elgibor-solution (1 commits)")

### Embed Badge

![Health badge](/badges/lichi-laravel-loki-logging/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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