Skip to content

weew/app-monolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App monolog provider

Build Status Code Quality Test Coverage Version Licence

Table of contents

Installation

composer require weew/app-monolog

Introduction

This package integrates the monolog/monolog library into the weew/php-app package.

Usage

To make monolog available inside the application, simply register MonologProvider on the kernel.

$app->getKernel()->addProviders([
    MonologProvider::class
]);

You can retrieve a specific logger by the channel name:

$channelManager = $app->getContainer()->get(IMonologChannelManager::class);
$channelManager->getLogger('config_name');

Example config

This is how your configuration might look like:

monolog:
  channels:

    default:
      log_file_path: /var/logs/default.log
      log_level: debug

    error:
      log_file_path: /var/logs/error.log
      log_level: debug

About

Integration of the monolog/monolog package into weew/app package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages