PHPackages                             mjkhajeh/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mjkhajeh/logger

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

mjkhajeh/logger
===============

Lightweight logger for WordPress themes and plugins.

v1.0.1(4mo ago)013MITPHPPHP &gt;=7.4

Since Feb 11Pushed 4mo agoCompare

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

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

MJ Logger
=========

[](#mj-logger)

Lightweight, WordPress-friendly logging library for themes and plugins.

Features
--------

[](#features)

- PSR-3 compatible API (levels and method names).
- Safe context handling with sensitive value redaction.
- Message interpolation using `{key}` placeholders.
- Automatic source detection for easier tracing.
- WordPress-aware timestamp and timezone handling.
- Simple file-based logging with size limit and locking.

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

[](#requirements)

- PHP 7.4 or higher.
- `psr/log` (declared in `composer.json`).

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

[](#installation)

Install via Composer:

```
composer require mj/logger
```

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

[](#quick-start)

```
