Added log level configuration param
Change-Id: I19e7528460ea3600abdf7d54b2d91d1fa89f1e10
This commit is contained in:
parent
33526e903d
commit
b72a7aa35f
@ -52,4 +52,5 @@ ACCESS_TOKEN_CACHE_LIFETIME=300
|
||||
API_RESPONSE_CACHE_LIFETIME=600
|
||||
|
||||
LOG_EMAIL_TO=smarcet@gmail.com
|
||||
LOG_EMAIL_FROM=smarcet@gmail.com
|
||||
LOG_EMAIL_FROM=smarcet@gmail.com
|
||||
LOG_LEVEL=info
|
@ -18,6 +18,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$monolog = Log::getMonolog();
|
||||
foreach($monolog->getHandlers() as $handler) {
|
||||
$handler->setLevel(Config::get('log.level', 'error'));
|
||||
}
|
||||
|
||||
//set email log
|
||||
$to = Config::get('log.to_email');
|
||||
|
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
return array(
|
||||
/**
|
||||
* EMAIL ERROR LOG CONFIGURATION
|
||||
*/
|
||||
//The receiver of the mail
|
||||
'to_email' => env('LOG_EMAIL_TO'),
|
||||
//The sender of the mail
|
||||
'from_email' => env('LOG_EMAIL_FROM'),
|
||||
);
|
||||
return array(
|
||||
/**
|
||||
* EMAIL ERROR LOG CONFIGURATION
|
||||
*/
|
||||
//The receiver of the mail
|
||||
'to_email' => env('LOG_EMAIL_TO'),
|
||||
//The sender of the mail
|
||||
'from_email' => env('LOG_EMAIL_FROM'),
|
||||
//Log Level (debug, info, notice, warning, error, critical, alert)
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user