arquivei/log-adapter

Arquivei Log Adapter

v1.0.0 2021-12-13 18:50 UTC

This package is auto-updated.

Last update: 2024-10-14 18:05:21 UTC


README

Latest Version on Packagist Total Downloads PHP Composer Scrutinizer Code Quality Code Coverage Code Intelligence Status

A Monolog wrapper as Laravel Package.

  • JSON Formatting
  • Monolog
  • Psr\Log\LoggerInterface support
  • Laravel Package Discovery support

Laravel Support

  • Log interface provider
  • HTTP Middleware to get TraceId Header

Installation

You can install the package via composer:

composer require arquivei/log-adapter

Usage

$logger = new LogAdapter();
$logger->setTraceId('88d98bf175fe832b70149a9637fcbb3f');
$logger->info('Logging', [
    'user' => 123
]);
{"message":"Logging","context":{"user":123},"level":200,"level_name":"INFO","channel":"arquivei_log_adapter","datetime":"2020-08-21 11:31:17.565757","extra":{"memory_peak_usage":"4 MB","memory_usage":"4 MB"},"trace_id":"88d98bf175fe832b70149a9637fcbb3f"}

Testing

composer tests

Full quality checks

composer check

Contributing

Please see CONTRIBUTING for details.

Local Development using Docker

docker build -f development.Dockerfile -t arquivei/php:7.4-development .

Security

If you discover any security related issues, please email andre.gomes@arquivei.com.br instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.