Download the PHP package contenir/contenir-log without Composer
On this page you can find all versions of the php package contenir/contenir-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package contenir-log
contenir/contenir-log
A small PSR-3 logger for Laminas MVC and Mezzio with pluggable storage. Ships
with filesystem and database backends; add your own by implementing
Contenir\Log\Storage\StorageInterface.
When a Throwable is passed in the PSR-3 context under exception, its message
chain and full stack trace are recorded (the error column / a multi-line file
entry) — so a logged 500 carries everything you need to debug it.
Install
- Laminas MVC: register the
Contenir\Logmodule (laminas-component-installer offers this automatically). - Mezzio: add
Contenir\Log\ConfigProviderto your config aggregator.
Configure
Override the log config key:
adapter is resolved through the container, so 'db' / 'filesystem' use the
package's aliases, and you can register your own StorageInterface and name its
service id here instead.
Use
Pull Contenir\Log\Logger from the container (it's a Psr\Log\LoggerInterface):
{uri} is a PSR-3 placeholder: any {key} in the message is replaced by the
matching context entry, so the line above is recorded as HTTP 500 at /checkout.
exception is special-cased — it is not interpolated into the message.
A Throwable passed there has its message chain and full stack trace captured
separately (the error column, or a multi-line block in the file backend),
keeping the message clean while preserving everything needed to debug.
priority / priorityName follow Laminas\Log's numeric scheme, so existing log
tables built for it remain compatible.
All versions of contenir-log with dependencies
php-db/phpdb Version 0.6.x-dev
psr/container Version ^1.0 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0