PHPackages                             vaibhavpandeyvpz/drishti - 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. vaibhavpandeyvpz/drishti

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

vaibhavpandeyvpz/drishti
========================

A lightweight, flexible PSR-3 compliant logging library with configurable backends and zero dependencies.

1.1.0(6mo ago)2311MITPHPPHP ^8.2CI passing

Since Dec 28Pushed 6mo agoCompare

[ Source](https://github.com/vaibhavpandeyvpz/drishti)[ Packagist](https://packagist.org/packages/vaibhavpandeyvpz/drishti)[ Docs](https://github.com/vaibhavpandeyvpz/drishti)[ RSS](/packages/vaibhavpandeyvpz-drishti/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (3)Used By (1)

Drishti
=======

[](#drishti)

[![Latest Version](https://camo.githubusercontent.com/bfe4ab01e1464e424a98d0db8b6ad034c1359b862bcd6ec465b90a60fe836bfd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661696268617670616e64657976707a2f647269736874692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/drishti)[![Downloads](https://camo.githubusercontent.com/0348a0e1881eb256dcb17ac021f88323fea127f24ac6ed3251949222e5663865/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661696268617670616e64657976707a2f647269736874692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/drishti)[![PHP Version](https://camo.githubusercontent.com/992c34f2ab030e99235c1ed523e4c2e4f1608bff9d8c213e8a367306b654f542/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696268617670616e64657976707a2f647269736874692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/drishti)[![License](https://camo.githubusercontent.com/ead24d7819d22715628176db279653328bbfe68928cddc27ff9cdad0f3f9e401/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7661696268617670616e64657976707a2f647269736874692e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/01ad2cc7e2c57a37162a6291b8ea3160f22653c50fb8540b3c04a9414e5c4623/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661696268617670616e64657976707a2f647269736874692f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/vaibhavpandeyvpz/drishti/actions)

A lightweight, flexible [PSR-3](https://www.php-fig.org/psr/psr-3/) compliant logging library with configurable backends, [PSR-20](https://www.php-fig.org/psr/psr-20/) Clock support, and minimal dependencies.

> **Drishti** (`दृष्टि`) - Sanskrit for "Vision" or "Sight", representing the ability to see and record what happens in your application.

Features
--------

[](#features)

- ✅ **PSR-3 Compliant** - Full implementation of the PSR-3 LoggerInterface specification
- ✅ **PSR-20 Clock Support** - Uses PSR-20 ClockInterface for time operations (testable and flexible)
- ✅ **Minimal Dependencies** - Only requires PSR-3 interface (psr/log) and PSR-20 Clock (psr/clock)
- ✅ **Configurable Backends** - Contract-based backend system for flexible log destinations
- ✅ **Multiple Backends** - Send logs to multiple destinations simultaneously
- ✅ **First-Party Backends** - Built-in support for stdout, stderr, files, and daily rotating files
- ✅ **First-Party Formatters** - Built-in SimpleLogEntryFormatter and JsonLogEntryFormatter
- ✅ **Message Interpolation** - Automatic placeholder replacement with context data
- ✅ **Exception Handling** - Automatic exception information in log entries
- ✅ **All Log Levels** - Supports all 8 PSR-3 log levels
- ✅ **Modern PHP** - Built for PHP 8.2+ with modern language features
- ✅ **100% Test Coverage** - Fully tested with comprehensive test suite

Installation
------------

[](#installation)

Install via Composer:

```
composer require vaibhavpandeyvpz/drishti
```

Quick Start
-----------

[](#quick-start)

```
