whatisgithub

What is log?

php-fig/log — explained in plain English

Analysis updated 2026-06-24

10,440PHPAudience · developerComplexity · 1/5Setup · easy

In one sentence

A minimal PHP package that defines a standard logging interface (PSR-3) so any PHP project can swap one logging library for another without changing application code.

Mindmap

mindmap
  root((repo))
    What it does
      Logging standard
      PHP interface only
      Swappable loggers
    Standard
      PSR-3 interface
      PHP-FIG group
      Composer install
    Log Levels
      Error and warning
      Info and debug
    Audience
      PHP developers
      Library authors
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a standard LoggerInterface type hint to your PHP classes so any PSR-3-compatible logger can be injected at runtime.

USE CASE 2

Write a reusable PHP library that supports logging without forcing users to depend on a specific logging tool.

What is it built with?

PHPComposer

How does it compare?

php-fig/logw7corp/easywechataureuserp/aureuserp
Stars10,44010,37710,545
LanguagePHPPHPPHP
Setup difficultyeasymoderatehard
Complexity1/53/54/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

This repository is not an actual logging tool. It defines a standard interface that describes what a logger should look like in PHP applications. The idea is that different PHP projects can agree on a shared contract for logging so that any library or application can swap out one logging solution for another without changing the surrounding code. The standard is called PSR-3, and it was produced by the PHP Framework Interoperability Group, a group of PHP project maintainers who collaborate on shared technical standards. By depending on this interface rather than a specific logger, your code stays compatible with many different logging libraries that implement the same contract. Installation is handled via Composer, which is the standard PHP package manager. Once installed, you can type-hint against the LoggerInterface in your own classes, and then inject whichever concrete logger you prefer at runtime. The README is brief and the package is intentionally minimal because its only job is to define the interface, not to provide the logging logic itself.

Copy-paste prompts

Prompt 1
Show me how to use the PSR-3 LoggerInterface from php-fig/log in my PHP class so I can inject Monolog or any other PSR-3 logger at runtime.
Prompt 2
Help me write a PHP service class that accepts a LoggerInterface and logs important events using the php-fig/log PSR-3 standard.
Prompt 3
What log levels does PSR-3 define, and how do I use the php-fig/log interface to log errors, warnings, and debug messages in a PHP application?

Frequently asked questions

What is log?

A minimal PHP package that defines a standard logging interface (PSR-3) so any PHP project can swap one logging library for another without changing application code.

What language is log written in?

Mainly PHP. The stack also includes PHP, Composer.

How hard is log to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is log for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.