PHPackages                             jmrashed/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. jmrashed/logger

ActiveLibrary

jmrashed/logger
===============

A lightweight, production-ready logging utility for development environments

v1.0.2(6mo ago)02MITPHPPHP &gt;=7.4CI failing

Since Nov 19Pushed 6mo agoCompare

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

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

Development Logger Library
==========================

[](#development-logger-library)

[![Latest Version](https://camo.githubusercontent.com/fcb9328c69184e06ef29024f068f73813a7ec4d053648f0935fcf5ed4ed8871e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6d7261736865642f6c6f676765722e737667)](https://packagist.org/packages/jmrashed/logger)[![PHP Version](https://camo.githubusercontent.com/ee880c2f59ab802799ec07f6b4327bc0832929161c0aaf4c6c4e225d78c95ea2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6d7261736865642f6c6f676765722e737667)](https://packagist.org/packages/jmrashed/logger)[![License](https://camo.githubusercontent.com/aaf977d5c97aa32f0ef648be73e1f073411c9af7d77e38ea249b273da693fab2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6d7261736865642f6c6f676765722e737667)](LICENSE)[![Build Status](https://github.com/jmrashed/logger/workflows/CI/badge.svg)](https://github.com/jmrashed/logger/actions)[![Code Coverage](https://camo.githubusercontent.com/cf66f2ac2f7e656f6f75efbe19f77e94dc5b52019ee596daf54f7b65faced8a3/68747470733a2f2f636f6465636f762e696f2f67682f6a6d7261736865642f6c6f676765722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/jmrashed/logger)

A lightweight, production-ready logging utility for development environments.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Composer (recommended for installation)

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Log Levels](#log-levels)
- [Log Format](#log-format)
- [File Structure](#file-structure)
- [Configuration](#configuration)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)
- [Security](#security)

Features
--------

[](#features)

- Multiple log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Automatic log rotation (10MB max, keeps 5 files)
- Context data support
- Thread-safe file writing
- Git-ignored log files
- PSR-4 autoloading
- Composer package support
- Comprehensive test suite
- GitHub Actions CI/CD

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

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require jmrashed/logger
```

### Manual Installation

[](#manual-installation)

Download the `Logger.php` file and include it in your project.

Usage
-----

[](#usage)

```
// Using Composer autoload
require_once 'vendor/autoload.php';

// Or manual include
require_once $_SERVER['DOCUMENT_ROOT'] . '/_Logger/Logger.php';

// Basic logging
\DevLogger\Logger::info('User logged in');
\DevLogger\Logger::error('Database connection failed');
\DevLogger\Logger::warning('Deprecated function used');

// Logging with context
\DevLogger\Logger::info('User action', ['user_id' => 123, 'action' => 'login']);
\DevLogger\Logger::error('Query failed', ['query' => 'SELECT * FROM users', 'error' => $e->getMessage()]);
```

Log Levels
----------

[](#log-levels)

- `DEBUG` - Detailed debug information
- `INFO` - General information messages
- `WARNING` - Warning messages
- `ERROR` - Error conditions
- `CRITICAL` - Critical conditions

Log Format
----------

[](#log-format)

```
[2024-01-15 14:30:25] [INFO] User logged in {"user_id":123,"action":"login"}

```

File Structure
--------------

[](#file-structure)

```
_Logger/
├── Logger.php              # Main logger class
├── example.php             # Usage example
├── composer.json           # Composer package configuration
├── phpunit.xml.dist        # PHPUnit configuration
├── .gitignore              # Git ignore rules
├── CHANGELOG.md            # Change log
├── CODE_OF_CONDUCT.md      # Code of conduct
├── CONTRIBUTING.md         # Contributing guidelines
├── LICENSE                 # License file
├── README.md               # This file
├── SECURITY.md             # Security policy
├── .github/                # GitHub workflows and templates
├── docs/                   # Documentation
│   ├── API.md              # API documentation
│   └── INSTALL.md          # Installation guide
└── tests/                  # Test files
    └── LoggerTest.php      # Unit tests

```

Configuration
-------------

[](#configuration)

The logger automatically:

- Creates log directory if it doesn't exist
- Rotates logs when they exceed 10MB
- Keeps maximum 5 log files
- Uses thread-safe file writing

Testing
-------

[](#testing)

Run the test suite:

```
composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Security
--------

[](#security)

For security issues, please see our [Security Policy](SECURITY.md).

Author
------

[](#author)

**Md Rasheduzzzaman**

- Email:
- GitHub: [@jmrashed](https://github.com/jmrashed)
- Repository:

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance69

Regular maintenance activity

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.3% 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

Every ~0 days

Total

3

Last Release

180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/12aeaba318c81d8e123faa3b8961a4e8a1ebf876e2a73b1e1ad08b3e5fc2f901?d=identicon)[jmrashed](/maintainers/jmrashed)

---

Top Contributors

[![jmrashed](https://avatars.githubusercontent.com/u/8583051?v=4)](https://github.com/jmrashed "jmrashed (12 commits)")[![rashed-pen](https://avatars.githubusercontent.com/u/243291486?v=4)](https://github.com/rashed-pen "rashed-pen (1 commits)")

---

Tags

loggerphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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