Download the PHP package smartdesk/debug-logger without Composer

On this page you can find all versions of the php package smartdesk/debug-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package debug-logger

SmartDesk DebugLogger

WordPress

[EN] Human-readable debug logger for WordPress development (PHP 8.1+).
Generates structured multi-line entries with SmartDesk caller info, an optional hook status block (♻️/⏳), and a level prefix (emoji + label).
Output goes to a sink: error_log() by default, optionally a rotating file via setWriter().
The output of a debug entry in debug.log or in your personal storage location looks something like this:

[DE] Menschenlesbarer Debug‑Logger für WordPress‑Entwicklung (PHP 8.1+).
Erzeugt strukturierte, mehrzeilige Einträge mit SmartDesk‑Caller‑Info, optionalem Hook‑Status‑Block (♻️/⏳) und Level‑Präfix (Emoji + Label).
Ausgabe geht an eine Senke (sink): standardmäßig error_log(), optional rotierende Datei via setWriter().
Die Ausgabe eines Debug-Eintrages in debug.log oder an deinem persönlichen Speicherort, sieht dann etwa so aus:

Table of Contents

Features

Requirements

Installation

Quick Start

Configuration

Basic Setup

Advanced Configuration

Output Configuration

Error Log Output (Default)

Rotating File Output

Custom Writer

Log Level Configuration

Request Tracking

API Reference

Static Methods

setWriter(WriterInterface $writer): void

Sets the output destination for log messages.

setMinLevel(string $level): void

Sets the minimum log level. Only messages at this level or higher will be output.

makeRotatingWriter(string $dir, string $filename, int $maxSize, int $maxFiles): FileHandler

Creates a rotating file handler.

Parameters:

Logging Methods

log(mixed $data, string|array $hooks = '', string $title = '', string $level = LogLevel::DEBUG): void

Main logging method.

Shortcut Methods

Timer Methods

timerStart(string $name): void

Starts a named timer.

timerLap(string $name, string $title = ''): void

Records a lap time without stopping the timer.

timerStop(string $name, string $title = '', string $level = LogLevel::DEBUG): void

Stops the timer and logs the total time.

Hook Methods

hook(string|array $hooks, string $title = ''): void

Logs only hook status information without additional data.

Usage Examples

Setup Rotating file sink with Request marker

Log

Log just Hook-State

Available Hook Presets

The logger includes predefined hook sets for common WordPress scenarios:

Preset Details:

Timer

Output:

Plugin Integration

WordPress

See the dedicated guide: WP-IMPLEMENTATION.md — step-by-step

  • Composer & manual install
  • Robust plugin bootstrap (autoloader fallback)
  • Theme & multisite setup
  • Hook/action tracking
  • DB query logging
  • Performance timers
  • WP-CLI integration
  • Security, and troubleshooting

Testing

Notes

Active only if WP_DEBUG === true.
Timestamps in UTC.
Single sink: default error_log(), or rotating file via setWriter().

License

GPL-3.0-or-later. See LICENSE.

Plugin-Header (if loaded as plugin)


All versions of debug-logger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smartdesk/debug-logger contains the following files

Loading the files please wait ...