PHPackages                             ap-lib/logger-debug - 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. ap-lib/logger-debug

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

ap-lib/logger-debug
===================

024PHP

Since Mar 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ap-lib/logger-debug)[ Packagist](https://packagist.org/packages/ap-lib/logger-debug)[ RSS](/packages/ap-lib-logger-debug/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

AP\\Logger
==========

[](#aplogger)

[![MIT License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

`DebugLog` is a simple and configurable logging utility for PHP that writes logs both to a specified file and PHP's built-in `error_log()` function. It supports log levels, context printing, stack traces, and customizable message formatting.

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

[](#installation)

```
composer require ap-lib/logger-debug
```

Features
--------

[](#features)

- Logs messages to a file and `error_log()`
- Supports configurable log levels
- Optionally prints context and stack traces for debugging
- Customizable timestamp format with timezone support
- Allows message formatting through a decorator function
- Ensures logs are written in append mode to preserve history

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

[](#requirements)

- PHP 8.3 or higher

Getting started
---------------

[](#getting-started)

```
use AP\Logger\Dumper\DebugLog;

Log::router()->setDefaultDumper(new DebugLog(
    filename: "/logs/default.log",
    log_level: Level::DEBUG,
    print_context: true,
    print_trace: false,
    timezone: "pst"
));
```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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.

### Community

Maintainers

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

---

Top Contributors

[![anton-panfilov](https://avatars.githubusercontent.com/u/1083546?v=4)](https://github.com/anton-panfilov "anton-panfilov (12 commits)")

### Embed Badge

![Health badge](/badges/ap-lib-logger-debug/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M261](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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