Download the PHP package meritum/logger without Composer

On this page you can find all versions of the php package meritum/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 logger

meritum/logger

Minimal PSR-3 logger that writes newline-delimited JSON to stdout. Designed for containerized environments where structured log output is consumed by a log aggregator (GCP Cloud Logging, AWS CloudWatch, Datadog, etc.).

Installation

Requirements

Usage

Standalone

Instantiate Logger directly with a writable resource and an optional minimum log level:

The second parameter sets the minimum log level. Messages below the minimum are silently discarded:

The default minimum level is debug, which passes all messages through.

With the Kernel

Add LoggerModule to your kernel to register Psr\Log\LoggerInterface as a shared service:

The minimum log level is resolved in this order:

  1. LOG_LEVEL environment variable, if set
  2. debug in Environment::Development
  3. info in all other environments

Overriding the binding

If you need a different logger implementation — a file-based logger, a test double, or a third-party PSR-3 library — define LoggerInterface in a module registered after LoggerModule:

The last definition wins, so LoggerModule does not need to be removed.

Log output

Each message is written as a single JSON object followed by a newline. The envelope always contains these fields:

Field Type Description
timestamp string RFC 3339 extended (e.g. 2026-06-10T14:32:01.123+00:00)
level string PSR-3 level name (debug, info, notice, warning, error, critical, alert, emergency)
severity string Reduced 4-value severity for structured log sinks (debug, info, warning, critical)
message string The log message
context object Contextual data; always present, empty object when no context is provided

Example output:

Severity mapping

PSR-3 defines 8 log levels. The severity field maps these to a reduced set aligned with common structured log sinks:

PSR-3 level Severity
emergency critical
alert critical
critical critical
error error
warning warning
notice info
info info
debug debug

The level field always carries the original PSR-3 value, so no information is lost.

Log levels

Valid levels in ascending severity order:

debug → info → notice → warning → error → critical → alert → emergency

An invalid level passed to either the constructor or log() throws \InvalidArgumentException.

License

MIT — see LICENSE.


All versions of logger with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
georgeff/kernel Version ^2.0
psr/log Version ^3.0
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 meritum/logger contains the following files

Loading the files please wait ...