mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Add debug info.
This commit is contained in:
@@ -81,11 +81,11 @@ class DebugController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function displayError(): void
|
public function displayError(): void
|
||||||
{
|
{
|
||||||
app('log')->debug('This is a test message at the DEBUG level.');
|
Log::debug('This is a test message at the DEBUG level.');
|
||||||
app('log')->info('This is a test message at the INFO level.');
|
Log::info('This is a test message at the INFO level.');
|
||||||
Log::notice('This is a test message at the NOTICE level.');
|
Log::notice('This is a test message at the NOTICE level.');
|
||||||
app('log')->warning('This is a test message at the WARNING level.');
|
Log::warning('This is a test message at the WARNING level.');
|
||||||
app('log')->error('This is a test message at the ERROR level.');
|
Log::error('This is a test message at the ERROR level.');
|
||||||
Log::critical('This is a test message at the CRITICAL level.');
|
Log::critical('This is a test message at the CRITICAL level.');
|
||||||
Log::alert('This is a test message at the ALERT level.');
|
Log::alert('This is a test message at the ALERT level.');
|
||||||
Log::emergency('This is a test message at the EMERGENCY level.');
|
Log::emergency('This is a test message at the EMERGENCY level.');
|
||||||
@@ -187,6 +187,8 @@ class DebugController extends Controller
|
|||||||
return [
|
return [
|
||||||
'php_version' => PHP_VERSION,
|
'php_version' => PHP_VERSION,
|
||||||
'php_os' => PHP_OS,
|
'php_os' => PHP_OS,
|
||||||
|
'build_time' => config('firefly.build_time'),
|
||||||
|
'build_time_nice' => Carbon::parse(config('firefly.build_time'), 'Europe/Amsterdam')->setTimezone('Europe/Amsterdam')->format('Y-m-d H:i:s e'),
|
||||||
'uname' => php_uname('m'),
|
'uname' => php_uname('m'),
|
||||||
'interface' => PHP_SAPI,
|
'interface' => PHP_SAPI,
|
||||||
'bits' => PHP_INT_SIZE * 8,
|
'bits' => PHP_INT_SIZE * 8,
|
||||||
@@ -212,11 +214,11 @@ class DebugController extends Controller
|
|||||||
try {
|
try {
|
||||||
if (file_exists('/var/www/counter-main.txt')) {
|
if (file_exists('/var/www/counter-main.txt')) {
|
||||||
$return['build'] = trim(file_get_contents('/var/www/counter-main.txt'));
|
$return['build'] = trim(file_get_contents('/var/www/counter-main.txt'));
|
||||||
app('log')->debug(sprintf('build is now "%s"', $return['build']));
|
Log::debug(sprintf('build is now "%s"', $return['build']));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
app('log')->debug('Could not check build counter, but thats ok.');
|
Log::debug('Could not check build counter, but thats ok.');
|
||||||
app('log')->warning($e->getMessage());
|
Log::warning($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -224,8 +226,8 @@ class DebugController extends Controller
|
|||||||
$return['build_date'] = trim(file_get_contents('/var/www/build-date-main.txt'));
|
$return['build_date'] = trim(file_get_contents('/var/www/build-date-main.txt'));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
app('log')->debug('Could not check build date, but thats ok.');
|
Log::debug('Could not check build date, but thats ok.');
|
||||||
app('log')->warning($e->getMessage());
|
Log::warning($e->getMessage());
|
||||||
}
|
}
|
||||||
if ('' !== (string) env('BASE_IMAGE_BUILD')) { // @phpstan-ignore-line
|
if ('' !== (string) env('BASE_IMAGE_BUILD')) { // @phpstan-ignore-line
|
||||||
$return['base_build'] = env('BASE_IMAGE_BUILD'); // @phpstan-ignore-line
|
$return['base_build'] = env('BASE_IMAGE_BUILD'); // @phpstan-ignore-line
|
||||||
@@ -282,7 +284,7 @@ class DebugController extends Controller
|
|||||||
$parts = Steam::getLocaleArray(Steam::getLocale());
|
$parts = Steam::getLocaleArray(Steam::getLocale());
|
||||||
foreach ($parts as $code) {
|
foreach ($parts as $code) {
|
||||||
$code = trim($code);
|
$code = trim($code);
|
||||||
app('log')->debug(sprintf('Trying to set %s', $code));
|
Log::debug(sprintf('Trying to set %s', $code));
|
||||||
$result = setlocale(LC_ALL, $code);
|
$result = setlocale(LC_ALL, $code);
|
||||||
$localeAttempts[$code] = $result === $code;
|
$localeAttempts[$code] = $result === $code;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,10 @@
|
|||||||
<td>Firefly III</td>
|
<td>Firefly III</td>
|
||||||
<td>{% if FF_IS_DEVELOP %}<!-- .Z9JBCmw64Zkx1pQw -->{% endif %}{% if not FF_IS_DEVELOP %}v{% endif %}{{ FF_VERSION }}</td>
|
<td>{% if FF_IS_DEVELOP %}<!-- .Z9JBCmw64Zkx1pQw -->{% endif %}{% if not FF_IS_DEVELOP %}v{% endif %}{{ FF_VERSION }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Build time</td>
|
||||||
|
<td>{{ system.build_time_nice }} ({{ system.build_time }})</td>
|
||||||
|
</tr>
|
||||||
{# PHP version + settings #}
|
{# PHP version + settings #}
|
||||||
<tr>
|
<tr>
|
||||||
<td>PHP version</td>
|
<td>PHP version</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user