mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Expand debug
This commit is contained in:
parent
24455bf980
commit
1c9c380c8c
@ -121,11 +121,11 @@ class DebugController extends Controller
|
||||
$search = ['~', '#'];
|
||||
$replace = ['\~', '# '];
|
||||
|
||||
$now = Carbon::now()->format('Y-m-d H:i:s e');
|
||||
$installationId = app('fireflyconfig')->get('installation_id', '')->data;
|
||||
$phpVersion = str_replace($search, $replace, PHP_VERSION);
|
||||
$phpOs = str_replace($search, $replace, PHP_OS);
|
||||
$interface = PHP_SAPI;
|
||||
$now = Carbon::now()->format('Y-m-d H:i:s e');
|
||||
$drivers = implode(', ', DB::availableDrivers());
|
||||
$currentDriver = DB::getDriverName();
|
||||
$userAgent = $request->header('user-agent');
|
||||
@ -137,14 +137,23 @@ class DebugController extends Controller
|
||||
$logChannel = config('logging.default');
|
||||
$appLogLevel = config('logging.level');
|
||||
$cacheDriver = config('cache.default');
|
||||
$loginProvider = config('auth.driver');
|
||||
$loginProvider = config('auth.providers.users.driver');
|
||||
|
||||
// some new vars.
|
||||
$telemetry = true === config('firefly.send_telemetry') && true === config('firefly.feature_flags.telemetry');
|
||||
$defaultLanguage = (string) config('firefly.default_language');
|
||||
$defaultLocale = (string) config('firefly.default_locale');
|
||||
$userLanguage = app('steam')->getLanguage();
|
||||
$userLocale = app('steam')->getLocale();
|
||||
$isDocker = env('IS_DOCKER', false);
|
||||
|
||||
// set languages, see what happens:
|
||||
$original = setlocale(LC_ALL, 0);
|
||||
$localeAttempts = [];
|
||||
$parts = app('steam')->getLocaleArray(app('steam')->getLocale());
|
||||
foreach ($parts as $code) {
|
||||
$code = trim($code);
|
||||
$code = trim($code);
|
||||
Log::debug(sprintf('Trying to set %s', $code));
|
||||
$localeAttempts[$code] = var_export(setlocale(LC_ALL, $code), true);
|
||||
}
|
||||
setlocale(LC_ALL, $original);
|
||||
@ -194,7 +203,14 @@ class DebugController extends Controller
|
||||
'interface',
|
||||
'logContent',
|
||||
'cacheDriver',
|
||||
'trustedProxies'
|
||||
'trustedProxies',
|
||||
'telemetry',
|
||||
'userLanguage',
|
||||
'userLocale',
|
||||
'defaultLanguage',
|
||||
'defaultLocale',
|
||||
'isDocker'
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ use Closure;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Controllers\RequestInformation;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class SessionFilter.
|
||||
@ -87,6 +88,7 @@ class Range
|
||||
|
||||
// send error to view if could not set money format
|
||||
if (false === $moneyResult) {
|
||||
Log::error('Could not set locale. The following array doesnt work: ', $localeArray);
|
||||
app('view')->share('invalidMonetaryLocale', true); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
@ -15,31 +15,43 @@
|
||||
<textarea rows="30" cols="100" name="debug_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:8pt;">
|
||||
Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION }}**.
|
||||
|
||||
| Variable | Content |
|
||||
| Scope | Version |
|
||||
| --- | --- |
|
||||
| Firefly III | {{ FF_VERSION }} |
|
||||
| Firefly III API | {{ config('firefly.api_version') }} |
|
||||
| PHP | {{ phpVersion }} |
|
||||
| Host | {{ phpOs }} |
|
||||
|
||||
| System info | Value |
|
||||
| --- | --- |
|
||||
| FF version | {{ FF_VERSION }} |
|
||||
| FF API version | {{ config('firefly.api_version') }} |
|
||||
| Installation ID | {{ installationId }} |
|
||||
| Using docker? | {% if isDocker %}true{% else %}false{% endif %} |
|
||||
| Telemetry | {% if telemetry %}true{% else%}false{% endif%} |
|
||||
| App environment | {{ appEnv }} |
|
||||
| App debug mode | {{ appDebug }} |
|
||||
| App cache driver | {{ cacheDriver }} |
|
||||
| App logging | {{ appLogLevel }}, {{ logChannel }} |
|
||||
| PHP version | {{ phpVersion }} |
|
||||
| Display errors | {{ displayErrors }} |
|
||||
| Session start | {{ session('start') }} |
|
||||
| Session end | {{ session('end') }} |
|
||||
| Session first | {{ session('first') }} |
|
||||
| Error reporting | {{ errorReporting }} |
|
||||
| Host | {{ phpOs }} |
|
||||
| Interface | {{ interface }} |
|
||||
| UserID | {{ Auth.user.id }} |
|
||||
{% for code,result in localeAttempts %}
|
||||
| Attempt at "{{ code }}" | {{ result }} |
|
||||
{% endfor %}
|
||||
| Default language | {{ defaultLanguage }} |
|
||||
| Default locale | {{ defaultLocale }} |
|
||||
| DB drivers | {{ drivers }} |
|
||||
| Current driver | {{ currentDriver }} |
|
||||
| Login provider | {{ loginProvider }} |
|
||||
| Trusted proxies (.env) | {{ trustedProxies }} |
|
||||
|
||||
| User info | Value |
|
||||
| --- | --- |
|
||||
| Session start | {{ session('start') }} |
|
||||
| Session end | {{ session('end') }} |
|
||||
| Session first | {{ session('first') }} |
|
||||
| User ID | {{ Auth.user.id }} |
|
||||
| User language | {{ userLanguage }} |
|
||||
| User locale | {{ userLocale }} |
|
||||
{% for code,result in localeAttempts %}
|
||||
| Attempt at "{{ code }}" | {{ result }} |
|
||||
{% endfor %}
|
||||
| User agent | {{ userAgent }} |
|
||||
</textarea>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user