Download the PHP package everon/logger without Composer
On this page you can find all versions of the php package everon/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download everon/logger
More information about everon/logger
Files in everon/logger
Package logger
Short Description PSR-3 compliant logger with pluggable architecture and unified, shareable configuration based on Monolog
License MIT
Informations about the package logger
EveronLogger
Monolog based, PSR-3 compliant logger, with pluggable architecture and simple configuration.
Features
- Pluggable architecture, semantically versioned
- Simple setup, with autocompletion
- One unified configuration schema
- Plugins can be grouped into sets to easily create customized and very specific loggers instances
- Monolog's handlers and processors constructors details and dependencies are never exposed
- Based on Monolog v3.x
Simple Usage
Log everything at level info and above to /tmp/example.log.
Content of /tmp/example.log.
Configuration
The configuration is done by simple data structures called configurators.
Each plugin configurator has its plugin specific settings.
For example, to use syslog and file logging, setup the StreamLoggerPluginConfigurator
and SyslogLoggerPluginConfigurator.
Logger Handler / Plugin
A logger plugin is used to create and configure corresponding Monolog's handler.
Besides LoggerPluginInterface a plugin can also implement PluginFormatterInterface,
in which case the custom formatter provided by the plugin will be used.
Setup with LoggerConfigurator
To set up a plugin with given handler, add it to the collection in LoggerConfigurator with add().
For example, setup logging to a redis server and enable memory usage processor.
Content of redis-queue-test in redis.
Logger processors
Add required processor classes to logger configurator with addProcessor().
Plugins
Basic
Set of plugins that require no extra vendor dependencies.
Gelf
Set of plugins for Graylog2 handlers.
Redis
Set of plugins for Redis handler.
Requirements
- PHP v8.1.x
- Monolog v3.x
Installation
Note: You only need to install this package if you want to develop a plugin for EveronLogger.
Otherwise, install specific plugins. See above.