PHPackages                             stefna/log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. stefna/log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

stefna/log
==========

Psr-3 log implementation for stefna.is

2.5.2(2mo ago)015.5k↓41.2%11MITPHPPHP ^8.1CI failing

Since Dec 4Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/stefna/log)[ Packagist](https://packagist.org/packages/stefna/log)[ RSS](/packages/stefna-log/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (8)Dependencies (24)Versions (37)Used By (1)

Stefna Logger
=============

[](#stefna-logger)

Stefna\\Logger\\ManagerInterface
--------------------------------

[](#stefnaloggermanagerinterface)

Class that handles creation of logger classes.

This is where you configure your main logger.

### Methods

[](#methods)

- `pushProcessor(callable $callback, string $channel = null): Manager`If channel is set the process will only be applied to that channel. If no instance of channel exists the process will be silently ignored

Stefna\\Logger\\MonologManager
------------------------------

[](#stefnaloggermonologmanager)

Manager that uses Monolog as the main logger.

It has one extra method on the manager and that's `pushHandler` that is so that you can configure custom handlers for select channels

- `pushHandler(HandlerInterface $handler, $channel = null): Manager`If channel is set the handler will only be applied to that channel. If no instance of channel exists the process will be silently ignored

Stefna\\Logger\\Logger Methods
------------------------------

[](#stefnaloggerlogger-methods)

### setManager

[](#setmanager)

Set log manager if this is not done all calls to `getLogger` will return a `NullLogger`

### getManager

[](#getmanager)

Get manager to add process or handler to main logger

### setChannelConfig

[](#setchannelconfig)

Add a channel specific config

### setGlobalConfig

[](#setglobalconfig)

Add multiple config options with one call

### getLogger

[](#getlogger)

Retrives a logging instance for `channel`

This method will create the logger if it don't exists and it check for configs for the specified `channel`

Example
-------

[](#example)

```
