private function loadFrontLogger(Logger $monolog)
    {
        $whoops = new \Whoops\Run;

        if (app_env('APP_ENV') == 'development') {
            $whoops->pushHandler(
                new \Whoops\Handler\PrettyPageHandler
            );
        }

        if (class_exists(\App\ErrorHandle::class)) {
            $handler = new \Whoops\Handler\CallbackHandler(
                function ($exception, $inspector, $run) use ($monolog) {
                    $monolog->error($exception->getMessage(), $exception->getTrace());

                    return call_user_func_array(
                        [new \App\ErrorHandle, 'handle'],
                        [$exception]
                    );
                }
            );

            $whoops->pushHandler($handler);
        }

        $whoops->register();
    }