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 today

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

17

—

LowBetter than 8% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

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://www.gravatar.com/avatar/1215fe5ecc9ba0ab1c730d3c992125cf6ebf460562e66be71ebae127789d465a?d=identicon)[AntonPanfilov](/maintainers/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.5k1.2B8.0k](/packages/psr-log)[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k43.4M260](/packages/spatie-laravel-activitylog)[itsgoingd/clockwork

php dev tools in your browser

5.9k26.9M84](/packages/itsgoingd-clockwork)[arcanedev/log-viewer

Provides a Log Viewer for Laravel

2.4k6.7M48](/packages/arcanedev-log-viewer)[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90234.0M32](/packages/bugsnag-bugsnag-laravel)[facade/flare-client-php

Send PHP errors to Flare

52299.4M4](/packages/facade-flare-client-php)

PHPackages © 2026

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