firefly-iii/app/Providers/AppServiceProvider.php

51 lines
1.0 KiB
PHP
Raw Normal View History

<?php
/**
* AppServiceProvider.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-02-05 05:08:25 -06:00
declare(strict_types = 1);
namespace FireflyIII\Providers;
2015-02-05 21:39:52 -06:00
use Illuminate\Support\ServiceProvider;
2016-04-08 07:44:53 -05:00
use Log;
2016-04-25 11:43:09 -05:00
/**
* Class AppServiceProvider
*
* @package FireflyIII\Providers
*/
2015-02-11 00:35:10 -06:00
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// force https urls
if (env('APP_FORCE_SSL', false)) {
\URL::forceSchema('https');
}
2015-02-11 00:35:10 -06:00
}
2015-02-05 21:39:52 -06:00
2015-02-11 00:35:10 -06:00
/**
* Register any application services.
*
* @return void
*/
public function register()
{
2016-04-08 07:44:53 -05:00
// make sure the logger doesn't log everything when it doesn't need to.
$monolog = Log::getMonolog();
foreach ($monolog->getHandlers() as $handler) {
2016-04-26 14:40:15 -05:00
$handler->setLevel(config('app.log-level'));
2016-04-08 07:44:53 -05:00
}
2015-02-11 00:35:10 -06:00
}
2015-02-05 21:39:52 -06:00
}