2016-04-08 07:44:53 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ConfigureLogging.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
2016-05-20 05:27:31 -05:00
|
|
|
declare(strict_types = 1);
|
|
|
|
|
2016-04-08 07:44:53 -05:00
|
|
|
namespace FireflyIII\Bootstrap;
|
|
|
|
|
|
|
|
use Illuminate\Contracts\Foundation\Application;
|
|
|
|
use Illuminate\Foundation\Bootstrap\ConfigureLogging as IlluminateConfigureLogging;
|
2016-04-25 11:43:09 -05:00
|
|
|
use Illuminate\Log\Writer;
|
2016-04-08 07:44:53 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class ConfigureLogging
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Bootstrap
|
|
|
|
*/
|
|
|
|
class ConfigureLogging extends IlluminateConfigureLogging
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param Application $app
|
|
|
|
* @param Writer $log
|
|
|
|
*/
|
2016-05-20 01:57:45 -05:00
|
|
|
protected function configureDailyHandler(Application $app, Writer $log)
|
2016-04-08 07:44:53 -05:00
|
|
|
{
|
2016-05-20 01:57:45 -05:00
|
|
|
$log->useDailyFiles(
|
|
|
|
$app->storagePath() . '/logs/firefly-iii.log',
|
|
|
|
$app->make('config')->get('app.log_max_files', 5)
|
|
|
|
);
|
2016-04-08 07:44:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Application $app
|
|
|
|
* @param Writer $log
|
|
|
|
*/
|
2016-05-20 01:57:45 -05:00
|
|
|
protected function configureSingleHandler(Application $app, Writer $log)
|
2016-04-08 07:44:53 -05:00
|
|
|
{
|
2016-05-20 01:57:45 -05:00
|
|
|
$log->useFiles($app->storagePath() . '/logs/firefly-iii.log');
|
2016-04-08 07:44:53 -05:00
|
|
|
}
|
2016-04-08 10:54:25 -05:00
|
|
|
}
|