PHPackages                             orbiit/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. orbiit/logger

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

orbiit/logger
=============

A high-performance, PSR-3 compliant logging library natively built for PHP 8.5+.

v1.0.0(1mo ago)012↑100%MITPHPPHP &gt;=8.5CI passing

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/icordeiro/orbiit-logger)[ Packagist](https://packagist.org/packages/orbiit/logger)[ RSS](/packages/orbiit-logger/feed)WikiDiscussions main Synced 1w ago

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

🚀 Orbiit Logger
===============

[](#-orbiit-logger)

Modern, secure and type-safe logging for PHP 8.5+ applications.

[English](#english) | [Português](#portugues)

---

[![PHP Version](https://camo.githubusercontent.com/32f59c86bd2e02e52e8a7baed4ffcf230bbf9b24f2d8c394ddb99bff6d628af4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533452533442533415f382e352d3838393262662e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHPStan Level 9](https://camo.githubusercontent.com/2be16d15246582172f1821423c757a4b16cfc12bbc65383ef3291e4924fa208b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253230392d626c756576696f6c65742e7376673f7374796c653d666c61742d737175617265)](https://phpstan.org)

---

🇺🇸 English
----------

[](#-english)

### 📌 Overview

[](#-overview)

**Orbiit Logger** is a high-performance, PSR-3 compliant logging engine designed for modern **PHP 8.5+** applications.

Built from scratch for **speed, security, and scalability**, it is ideal for:

- Retail environments (POS)
- SaaS platforms
- High-concurrency systems

It includes **native recursive data masking**, ensuring **LGPD/GDPR compliance out of the box**.

---

### ⚡ Why Orbiit Logger?

[](#-why-orbiit-logger)

Orbiit Logger was built with a modern approach, leveraging the latest PHP features to deliver a clean and efficient logging experience:

- 🔒 **Automatic Data Masking**
    Prevents leaks of sensitive data (CPF, Credit Cards, Passwords)
- 🚀 **Performance-Oriented Design**
    Minimal memory footprint with atomic writes (`LOCK_EX`)
- 🧠 **Type-Safe by Design**
    Enums + Readonly properties (PHPStan Level 9)
- 🔗 **Ecosystem Friendly**
    Seamless integration with Orbiit Router and any PSR-3 compatible system

---

### 🚀 Quick Start

[](#-quick-start)

#### Installation

[](#installation)

```
composer require orbiit/logger
```

#### Basic Usage

[](#basic-usage)

```
use Orbiit\Logger\Logger;
use Orbiit\Logger\Handlers\FileHandler;
use Orbiit\Logger\Enums\Level;

// 1. Setup handler
$handler = new FileHandler(DIR . '/logs/app.log', Level::DEBUG);

// 2. Initialize Logger
$logger = new Logger([$handler]);

// 3. Log securely
$logger->info('New sale processed', [
    'order_id' => '1025',
    'customer_cpf' => '123.456.789-00', // Auto-masked
    'total' => 250.50
]);
```

---

### 🔐 Built-in Security (LGPD Ready)

[](#-built-in-security-lgpd-ready)

The **DataMasker interceptor** automatically detects and obfuscates sensitive data.

**Protected keys:**

```
password, token, api_key, secret, card_number, cvv, cpf, cnpj, email

```

---

### 🔍 Deep Nesting Support

[](#-deep-nesting-support)

Sensitive data is masked even inside **deep nested arrays or API responses**.

---

### 🌍 Real World Scenarios

[](#-real-world-scenarios)

#### 1. SaaS Integration

[](#1-saas-integration)

```
$router->add('POST', '/api/v1/login', function() use ($logger) {
    $logger->notice('Login attempt', $_POST);
});
```

---

#### 2. Retail / POS

[](#2-retail--pos)

```
try {
    $payment->process($creditCard);
} catch (PaymentException $e) {
    $logger->error('Payment failed', [
        'reason' => $e->getMessage(),
        'card_number' => $creditCard->number,
        'terminal_id' => 'PDV-65'
    ]);
}
```

---

### 🏗️ Architecture

[](#️-architecture)

- **Contracts** → Strict interfaces (Handlers &amp; Formatters)
- **Enums** → RFC 5424 severity levels
- **Immutability** → Readonly components

### ⚡ Performance Philosophy

[](#-performance-philosophy)

Orbiit Logger was designed with a performance-first mindset:

- Minimal abstraction layers
- Direct file writes using `LOCK_EX`
- No processor pipeline overhead
- Native PHP 8.5 features (Enums, Readonly)

### 🧪 Benchmark (Coming Soon)

[](#-benchmark-coming-soon)

A reproducible benchmark suite is being prepared.

It will include:

- Comparison with other PSR-3 loggers
- Memory usage analysis
- High concurrency simulation
- Real-world logging scenarios

Stay tuned 🚀

---

### 🤝 Contributing

[](#-contributing)

1. Fork the project
2. Create your branch
3. Run PHPStan:

```
composer stan
```

4. Run tests:

```
composer test
```

---

### 📄 License

[](#-license)

MIT License — see `LICENSE`

---

🇧🇷 Português
------------

[](#-português)

### 📌 Visão Geral

[](#-visão-geral)

O **Orbiit Logger** é um motor de logs de alta performance, compatível com **PSR-3**, desenvolvido para aplicações modernas em **PHP 8.5+**.

Projetado para **velocidade, segurança e escalabilidade**, é ideal para:

- Ambientes de varejo (PDV)
- Plataformas SaaS
- Sistemas de alta concorrência

Possui **mascaramento automático de dados sensíveis**, garantindo conformidade com **LGPD/GDPR**.

---

### ⚡ Por que usar o Orbiit Logger?

[](#-por-que-usar-o-orbiit-logger)

- 🔒 **Mascaramento automático de dados**
- 🚀 **Alta performance (LOCK\_EX)**
- 🧠 **Tipagem forte (Enums + Readonly)**
- 🔗 **Integração com Orbiit Router**

---

### 🚀 Início Rápido

[](#-início-rápido)

#### Instalação

[](#instalação)

```
composer require orbiit/logger
```

#### Uso básico

[](#uso-básico)

```
$logger->info('Venda realizada', [
    'cpf' => '123.456.789-00', // mascarado automaticamente
]);
```

---

### 🔐 Segurança nativa

[](#-segurança-nativa)

Protege automaticamente:

```
password, token, api_key, secret, card_number, cvv, cpf, cnpj, email

```

---

### 🌍 Casos reais

[](#-casos-reais)

#### SaaS

[](#saas)

```
$logger->notice('Tentativa de login', $_POST);
```

#### PDV

[](#pdv)

```
$logger->error('Falha no pagamento', [
    'cartao' => '****'
]);
```

---

### 🏗️ Arquitetura

[](#️-arquitetura)

- Contracts bem definidos
- Enums nativos
- Componentes imutáveis

---

### 🤝 Contribuição

[](#-contribuição)

```
composer stan
composer test
```

---

### 📄 Licença

[](#-licença)

MIT License

---

---

Built with 💙 by icordeiro
Designed for modern PHP applications

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48436136?v=4)[Israel Cordeiro](/maintainers/icordeiro)[@icordeiro](https://github.com/icordeiro)

---

Top Contributors

[![icordeiro](https://avatars.githubusercontent.com/u/48436136?v=4)](https://github.com/icordeiro "icordeiro (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/orbiit-logger/health.svg)

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k240.0M312](/packages/sentry-sentry)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6425.0M597](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M180](/packages/api-platform-metadata)[pagemachine/typo3-formlog

Form log for TYPO3

23233.9k7](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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