jantia / logit
Jantia PSR-3 implementation for Logs
dev-dev
2024-09-20 14:36 UTC
Requires
- php: ^8.3.0
- ext-mbstring: *
- ext-openssl: *
- jantia/plugin-message: @dev|^3.0.0
- jantia/plugin-monitor: @dev|^3.0.0
- jantia/stdlib: @dev|^3.0.0
- laminas/laminas-uri: ^2.12.0
- psr/log: ^3.0.2
- tiat/fluentd: ^3.0.0
- tiat/standard: ^3.0.0
- tiat/stdlib: ^3.1.0
Requires (Dev)
- phpunit/phpunit: ^11.3.6
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2025-01-20 12:17:21 UTC
README
Logit handle your logs to files, databases and various data lakes. Complete list of handlers is below. You can build your own special handlers with advanced logging strategies with info at below.
This library implements the PSR-3 interface that you can type-hinst against in your own libraries to keep a maximum interoperability. You can also use it in your applications to make sure you can always use another compatible logger at a later time.
Installation
Install the latest version with
$ composer require jantia/logit
Basic Usage
<?php
use Jantia\LogitLevel;
use Jantia\Logger;
use Jantia\Handler\FileHandler;
// create a log channel
$log = new Logger('name');
$log->pushHandler(new Handler('path/to/your.log', LogitLevel::Warning->value));
// add records to the log
$log->warning('My warning');
$log->error('My error');
Documentation
About
Requirements
- Logit
^3.0
works with PHP 8.3 or above.
Author
Jan Theon - jan@jantheon.com
License
Logit is licensed under the BSD 3-Clause License - see the LICENSE file for details