PHPackages                             vilasboas/log-formatter - 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. vilasboas/log-formatter

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

vilasboas/log-formatter
=======================

0.2.5(7mo ago)011PHPPHP &gt;=8.1

Since Sep 25Pushed 7mo agoCompare

[ Source](https://github.com/williamvilas/xx-log)[ Packagist](https://packagist.org/packages/vilasboas/log-formatter)[ RSS](/packages/vilasboas-log-formatter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

xx-log / LogFormatter
=====================

[](#xx-log--logformatter)

Uma biblioteca PHP para formatar logs em JSON estruturado compatível com Monolog / Laravel.

---

🛠️ Funcionalidades
------------------

[](#️-funcionalidades)

- Formatação de registros individuais em JSON com campos padronizados (aplicação, ambiente, nível, mensagem, contexto e datetime).
- Processamento em lote (batch) de registros.
- Compatível com registros do tipo `Monolog\LogRecord` ou arrays simples.
- Fácil integração em projetos Laravel / Illuminate.

---

🚀 Instalação
------------

[](#-instalação)

Adicione à lista de dependências via Composer:

```
composer require vilasboas/log-formatter
```

Configuration Laravel
---------------------

[](#configuration-laravel)

### `config/app.php`

[](#configappphp)

Add the service provider to the `providers` array:

```
'providers' => [
    // Other providers...
    LogFormatter\Providers\LoggerServiceProvider::class,
],
```

Configuration Lumen
-------------------

[](#configuration-lumen)

### `config/app.php`

[](#configappphp-1)

Add the service provider to the `providers` array:

### Template log

[](#template-log)

```
{"application":"api_cte","environment":"local","level":"INFO","message":"Response via api","context":{"type":"response","requestId":"6d20bcc1-5122-4333-a792-f49de948824a","status":200,"headers":{"cache-control":["no-cache, private"],"date":["Thu, 25 Sep 2025 18:50:33 GMT"],"content-type":["application/json"]},"body":"{\"data\":{\"id\":480,\"cnpj\":\"000000000\",\"corporate_name\":\"NAME LTDA\",\"fantasy_name\":\"NAME FANTASY\",\"email_ergon\":null,\"credit_Products\":[{\"id\":2,\"product_name\":\"Capital de Giro\",\"description\":\"Solu\\u00e7\\u00e3o de cr\\u00e9dito que oferece recursos financeiros para apoiar as opera\\u00e7\\u00f5es di\\u00e1rias e o fluxo de caixa das empresas.\",\"created_at\":\"2024-11-18T21:56:43.000000Z\",\"updated_at\":\"2024-11-18T21:56:43.000000Z\",\"pivot\":{\"company_id\":480,\"credit_product_id\":2}},{\"id\":1,\"product_name\":\"P\\u00f3s Pago\",\"description\":\"Produto que permite ao cliente antecipar o valor e pagar pelas opera\\u00e7\\u00f5es realizadas em uma data posterior, com condi\\u00e7\\u00f5es flex\\u00edveis de pagamento.\",\"created_at\":\"2024-11-18T21:56:43.000000Z\",\"updated_at\":\"2024-11-18T21:56:43.000000Z\",\"pivot\":{\"company_id\":480,\"credit_product_id\":1}}],\"created_at\":\"2024-03-21 14:57:02\",\"updated_at\":\"2025-03-14 12:52:18\"}}"},"datetime":"2025-09-25T15:50:34-03:00"}
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance67

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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

Unknown

Total

1

Last Release

226d ago

### Community

Maintainers

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

---

Top Contributors

[![williamboas-lang](https://avatars.githubusercontent.com/u/249775014?v=4)](https://github.com/williamboas-lang "williamboas-lang (20 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/vilasboas-log-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/vilasboas-log-formatter/health.svg)](https://phpackages.com/packages/vilasboas-log-formatter)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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