Overrule logging.

This commit is contained in:
James Cole 2017-01-30 16:30:35 +01:00
parent b79dcd7f23
commit 14971cf249
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 58 additions and 5 deletions

View File

@ -0,0 +1,53 @@
<?php
/**
* LogServiceProvider.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Providers;
use Illuminate\Log\LogServiceProvider as LaravelLogServiceProvider;
use Illuminate\Log\Writer;
/**
* Class LogServiceProvider
*
* @package FireflyIII\Providers
*/
class LogServiceProvider extends LaravelLogServiceProvider
{
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Log\Writer $log
*
* @return void
*/
protected function configureDailyHandler(Writer $log)
{
$log->useDailyFiles(
$this->app->storagePath() . '/logs/firefly-iii.log', $this->maxFiles(),
$this->logLevel()
);
}
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Log\Writer $log
*
* @return void
*/
protected function configureSingleHandler(Writer $log)
{
$log->useFiles(
$this->app->storagePath() . '/logs/firefly-iii.log',
$this->logLevel()
);
}
}

View File

@ -26,8 +26,8 @@ return [
'providers' => [
/*
* Laravel Framework Service Providers...
*/
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
@ -50,12 +50,11 @@ return [
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
/*
* Application Service Providers...
*/
FireflyIII\Providers\LogServiceProvider::class,
FireflyIII\Providers\AppServiceProvider::class,
FireflyIII\Providers\AuthServiceProvider::class,
// FireflyIII\Providers\BroadcastServiceProvider::class,
@ -92,11 +91,12 @@ return [
],
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,