Download the PHP package maplesnow/laravel-monolog-config without Composer
On this page you can find all versions of the php package maplesnow/laravel-monolog-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-monolog-config
Introduction
This package provides a simple way to configure monolog in Laravel.
This makes it a cinch to configure these handlers, allowing you to mix and match them to customize your application's log handling.
Project development with reference to Astromic/laravel-monlog-config .
Installation
-
Require this package with composer using the following command:
-
After updating composer, add the service provider to the
providers
array inconfig/app.php
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
-
Publish the configuration for monolog using the following command:
-
Use the application's
configureMonologUsing
method in yourbootstrap/app.php
like this
Configuration
All of the configuration for your application's logging system is housed in the config/logging.php
configuration file.
enable
is the trigger to control your application's log channels active or disabled.
Name | Description | Handler |
---|---|---|
single |
writing log as like as laravel single channel | StreamHandler |
daily |
writing log as like as laravel daily channel | RotatingFileHandler |
syslog |
writing log as like as laravel syslog channel | SyslogHandler |
errorlog |
writing log as like as laravel errorlog channel | ErrorLogHandler |
mail |
sending a mail report some urgent exception | SwfitMailHandler |
redis |
writing log to redis | RedisHandler |
redisFilter |
writing log to redis depends on level and date | RedisFilterHandler |
Usage
You may write information to the logs using the laravel's Log
facade.The logger provides the eight logging levels: emergency, alert, critical, error, warning, notice, info and debug。
If you need to output custom information, you need to define the content to be output under an array of extra
for the key.