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

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

wpdiggerstudio/wpzylos-logger
=============================

PSR-3 compliant logging for WPZylos framework

v1.0.0(5mo ago)00MITPHPPHP ^8.0CI failing

Since Feb 1Pushed 2w agoCompare

[ Source](https://github.com/WPDiggerStudio/wpzylos-logger)[ Packagist](https://packagist.org/packages/wpdiggerstudio/wpzylos-logger)[ Docs](https://github.com/WPDiggerStudio/wpzylos-logger)[ Fund](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)[ RSS](/packages/wpdiggerstudio-wpzylos-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

WPZylos Logger
==============

[](#wpzylos-logger)

[![PHP Version](https://camo.githubusercontent.com/911a83e2aa6fe73660ab613629a95c76622bf03049a7344e80c5ea72d4ef9c7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e302d626c7565)](https://php.net)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![GitHub](https://camo.githubusercontent.com/dbe820b98864e115173c422b9472b725cfa678bee03b66ff2c453dad95a3d20b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d575044696767657253747564696f2d3138313731373f6c6f676f3d676974687562)](https://github.com/WPDiggerStudio/wpzylos-logger)

PSR-3 compliant logging for WPZylos framework.

📖 **[Full Documentation](https://wpzylos.com)** | 🐛 **[Report Issues](https://github.com/WPDiggerStudio/wpzylos-logger/issues)**

---

✨ Features
----------

[](#-features)

- **PSR-3 Compliant** — Standard `LoggerInterface` implementation
- **8 Log Levels** — Emergency through Debug
- **Context Interpolation** — `{placeholder}` token support
- **Exception Stack Traces** — Auto-appended via `exception` context key
- **Daily Log Files** — Automatic daily file rotation
- **Minimum Level Filter** — Only log above a threshold
- **Log Cleanup** — `cleanOldLogs()` deletes old files
- **ServiceProvider** — Container-ready with PSR-3 binding

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionPHP^8.0WordPress6.0+---

🚀 Installation
--------------

[](#-installation)

```
composer require wpdiggerstudio/wpzylos-logger
```

---

📖 Quick Start
-------------

[](#-quick-start)

### 1. Register ServiceProvider

[](#1-register-serviceprovider)

```
$app->register(new \WPZylos\Framework\Logger\LoggerServiceProvider());
```

### 2. Use via Container

[](#2-use-via-container)

```
use Psr\Log\LoggerInterface;

$logger = $app->make(LoggerInterface::class);
// or: $app->make('log');
// or: $app->make('logger');

$logger->info('User {name} logged in', ['name' => 'John']);
$logger->error('Payment failed', ['order_id' => 456]);
```

### 3. Direct Instantiation

[](#3-direct-instantiation)

```
use WPZylos\Framework\Logger\Logger;

$logger = new Logger($context, null, 'warning');
$logger->warning('Low disk space');
```

---

🏗️ Core Features
----------------

[](#️-core-features)

### Log Levels

[](#log-levels)

```
$logger->emergency('System is unusable');
$logger->alert('Action must be taken immediately');
$logger->critical('Critical conditions');
$logger->error('Error conditions');
$logger->warning('Warning conditions');
$logger->notice('Normal but significant condition');
$logger->info('Informational messages');
$logger->debug('Debug-level messages');
```

### Context Data

[](#context-data)

```
$logger->info('Order placed', [
    'order_id' => $order->id,
    'user_id' => $user->id,
    'total' => $order->total,
]);
```

### Log Files

[](#log-files)

```
// Logs written to: wp-content/uploads/{slug}/logs/2025-01-15.log
$logger->info('Application started');

// Clean old logs (30 days default)
$deleted = $logger->cleanOldLogs(30);
```

---

📦 Related Packages
------------------

[](#-related-packages)

PackageDescription[wpzylos-core](https://github.com/WPDiggerStudio/wpzylos-core)Application foundation[wpzylos-scaffold](https://github.com/WPDiggerStudio/wpzylos-scaffold)Plugin template---

📖 Documentation
---------------

[](#-documentation)

For comprehensive documentation, tutorials, and API reference, visit **[wpzylos.com](https://wpzylos.com)**.

---

☕ Support the Project
---------------------

[](#-support-the-project)

- [GitHub Sponsors](https://github.com/sponsors/wpdiggerstudio)
- [PayPal Donate](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)

---

📄 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE) for details.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

**Made with ❤️ by [WPDiggerStudio](https://github.com/WPDiggerStudio)**

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance86

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

153d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55980087?v=4)[WPDiggerStudio](/maintainers/WPDiggerStudio)[@WPDiggerStudio](https://github.com/WPDiggerStudio)

---

Top Contributors

[![WPDiggerStudio](https://avatars.githubusercontent.com/u/55980087?v=4)](https://github.com/WPDiggerStudio "WPDiggerStudio (9 commits)")

---

Tags

psr-3loggingwordpressdebugerror handlingwpzylos

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k247.1M335](/packages/sentry-sentry)[inpsyde/wonolog

Monolog-based logging package for WordPress.

184637.3k7](/packages/inpsyde-wonolog)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3511.6M24](/packages/analog-analog)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2819.3k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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