承接 orbiit/logger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

orbiit/logger

最新稳定版本:v1.0.0

Composer 安装命令:

composer require orbiit/logger

包简介

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

README 文档

README

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

English | Português

PHP Version License PHPStan Level 9

🇺🇸 English

📌 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?

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

Installation

composer require orbiit/logger

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)

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

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

🌍 Real World Scenarios

1. SaaS Integration

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

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

  • Contracts → Strict interfaces (Handlers & Formatters)
  • Enums → RFC 5424 severity levels
  • Immutability → Readonly components

⚡ 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)

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

  1. Fork the project
  2. Create your branch
  3. Run PHPStan:
composer stan
  1. Run tests:
composer test

📄 License

MIT License — see LICENSE

🇧🇷 Português

📌 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?

  • 🔒 Mascaramento automático de dados
  • 🚀 Alta performance (LOCK_EX)
  • 🧠 Tipagem forte (Enums + Readonly)
  • 🔗 Integração com Orbiit Router

🚀 Início Rápido

Instalação

composer require orbiit/logger

Uso básico

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

🔐 Segurança nativa

Protege automaticamente:

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

🌍 Casos reais

SaaS

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

PDV

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

🏗️ Arquitetura

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

🤝 Contribuição

composer stan
composer test

📄 Licença

MIT License

Built with 💙 by icordeiro
Designed for modern PHP applications

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固