Use a factory to Config and LocaleManager (see #298)
This commit is contained in:
parent
96a75cbf14
commit
280618bb6b
9 changed files with 145 additions and 87 deletions
|
@ -4,6 +4,7 @@ namespace Alltube;
|
|||
|
||||
use Consolidation\Log\Logger;
|
||||
use Consolidation\Log\LogOutputStyler;
|
||||
use Slim\Container;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
||||
/**
|
||||
|
@ -14,11 +15,12 @@ class LoggerFactory
|
|||
{
|
||||
|
||||
/**
|
||||
* @param Container $container
|
||||
* @return Logger
|
||||
*/
|
||||
public static function create()
|
||||
public static function create(Container $container)
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
$config = $container->get('config');
|
||||
if ($config->debug) {
|
||||
$verbosity = ConsoleOutput::VERBOSITY_DEBUG;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue