Download the PHP package ecourty/logger-bundle without Composer

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

Logger Bundle

CI

A Symfony bundle providing a single, reusable Logger service — structured, context-typed logging with pluggable, per-project parameter processors, instead of hand-rolling the same Logger/LogParameterProcessorInterface pattern in every project.

Table of Contents


Requirements


Installation

Register the bundle in config/bundles.php (if not using Symfony Flex):

Declare the Monolog channel Logger will write to (the bundle reuses an existing channel, it never creates one for you — pick any name that fits your project):


Core Features


Configuration

Option Type Default Description
channel string (required) Monolog channel the Logger service writes to. Must be declared under monolog.channels in your own config.
message_prefix string \| null null Prepended to every message on this channel (e.g. "PMS - "). Disabled when null.
enable_builtin_processors bool true Register the bundle's own default processors (currently: ThrowableLogParameterProcessor). Set to false to fully replace them.

Usage

Logging

Autowire Ecourty\LoggerBundle\Service\Logger like any other service:

All 8 PSR-3 levels are available: emergency, alert, critical, error, warning, notice, info, debug.

Defining Log Contexts

Log contexts are plain \BackedEnum cases — no bundle interface to implement. Define one enum per domain, alongside that domain's own code:

Writing a Custom Parameter Processor

Implement Ecourty\LoggerBundle\Contract\LogParameterProcessorInterface. It's auto-registered — no service configuration needed:

Tip: processors are tried in registration order; the first one whose supports() returns true wins. The bundled ThrowableLogParameterProcessor handles any \Throwable — set enable_builtin_processors: false if you want to replace it with your own.

Message Prefixing

Set message_prefix to identify which application a log line came from once several projects ship to the same aggregator:

Enforcing the Pattern with PHPStan

Register the bundled rule in your own phpstan.neon to forbid injecting Psr\Log\LoggerInterface directly anywhere in your codebase:


Development

See AGENTS.md for architecture details and contribution guidelines.


License

This bundle is released under the MIT License.


All versions of logger-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
psr/log Version ^3.0
symfony/config Version ^7.0|^8.0
symfony/dependency-injection Version ^7.0|^8.0
symfony/http-kernel Version ^7.0|^8.0
symfony/monolog-bundle Version ^3.0|^4.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 ecourty/logger-bundle contains the following files

Loading the files please wait ...