Download the PHP package sirix/monolog without Composer

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

Mezzio Monolog Factory

Latest Stable Version Total Downloads License PHP Version Require

Explicit Mezzio Monolog factory integration built around PSR-11, strict configuration, and predictable factories.

Requirements

Installation

Register the config provider

In Mezzio applications that use laminas/laminas-component-installer, the provider is registered automatically during Composer install.

If your application does not use auto-discovery, add the provider to config/config.php manually:

The provider registers logger, Monolog\Logger, and Psr\Log\LoggerInterface for the default logger service.

Default behavior

If no monolog configuration is provided, the package still exposes a safe default logger. The default services point to the default channel, that channel uses the Monolog name app, and it writes to a noop handler. Requesting Psr\Log\LoggerInterface is therefore safe even before application logging is configured; records are discarded until you define real handlers.

Defaults are applied per missing section. For example, a basic application can configure channels and handlers while omitting logger_services; the default logger service map will continue to point to the default channel.

Minimal configuration

Create config/autoload/monolog.global.php. The basic configuration does not need a logger_services section because logger, Monolog\Logger, and Psr\Log\LoggerInterface are registered for the default channel automatically:

Use the logger from the container:

Multiple logger services

Map any service id to a channel id with logger_services. Use a string value when the service should use the configured channel as-is. Use the array form when the service should reuse a configured channel stack but emit records with a different Monolog channel name.

Providing logger_services replaces the default service map for that section, so keep the logger entry when the default logger service should remain available. With the provided ConfigProvider, Monolog\Logger and Psr\Log\LoggerInterface are aliases to logger; keep the class-name entries too only if your container resolves those ids through LoggerFactory directly instead of aliases.

Register additional logger services with Sirix\Monolog\Factory\LoggerFactory in your container if your framework does not auto-wire them from the dependency config.

In the example above, logger_crypto_transaction reuses the audit channel's handlers and processors but writes CryptoTransactionService into Monolog's record channel field.

Built-in types

Handlers

Formatters

Processors

Runtime notes

Configured loggers, handlers, formatters, and processors are cached for the container lifetime. In long-running workers, call Logger::reset() between jobs/messages so Monolog can flush buffers and release or reopen stateful resources.

Handlers are shared by handler id. If multiple channels reference the same handler id, they share the same handler instance and state. Use separate handler ids when buffered, deduplicated, or otherwise stateful handlers must be isolated.

Handler and processor order is preserved as written in configuration. This matters for bubble, wrapper handlers, filters, and processor chains.

A handler-local formatter requires a Monolog handler that supports formatters. Handler-local processors require a processable handler. Unsupported combinations fail fast with a configuration exception instead of being ignored.

For stream handlers, file_permission defaults to Monolog's default when omitted or set to null, so file permissions remain controlled by your process umask. use_locking defaults to false, matching Monolog. Enable it only when multiple processes write to the same file and you want flock() around each write.

Optional integrations

Many built-in handlers and formatters wrap Monolog integrations that require optional packages or PHP extensions. Install only the dependencies you use; Composer suggest lists the packages/extensions required by each optional integration. If an optional dependency is missing, the related factory fails with a configuration error when that handler, formatter, or processor is built.

Custom factories

Register custom factory classes under handler_factories, formatter_factories, or processor_factories.

Custom factories must implement one of:

Documentation

Notes for 2.x

Version 2.x is a breaking release. The legacy MonologFactory, ChannelChanger, service managers, mappers, container-aware traits, and __invoke(array $options) factory API were removed. Use ConfigProvider, enum-backed configuration, and the strict factory interfaces instead.


All versions of monolog with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
monolog/monolog Version ^3.10
psr/container Version ^1.0 || ^2.0.2
psr/log Version ^2.0 || ^3.0.2
sirix/container-resolver Version ^1.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 sirix/monolog contains the following files

Loading the files please wait ...