Clean up some logs.

This commit is contained in:
James Cole committed 2026-10-10 10:20:01 +02:00
1 parent c8ece8bee3
commit bb7ffae320
3 files changed
+12 -12

No files matched your search

+5 -5
View File
@@ -93,12 +93,12 @@ final class HomeController extends Controller
$label = $request->input('label');
$isCustomRange = false;
Log::debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->input('label')]);
//Log::debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->input('label')]);
// check if the label is "everything" or "Custom range" which will betray
// a possible problem with the budgets.
if ($label === (string) trans('firefly.everything') || $label === (string) trans('firefly.customRange')) {
$isCustomRange = true;
Log::debug('Range is now marked as "custom".');
//Log::debug('Range is now marked as "custom".');
}
$diff = $start->diffInDays($end, true) + 1;
@@ -108,11 +108,11 @@ final class HomeController extends Controller
}
$request->session()->put('is_custom_range', $isCustomRange);
Log::debug(sprintf('Set is_custom_range to %s', var_export($isCustomRange, return: true)));
// Log::debug(sprintf('Set is_custom_range to %s', var_export($isCustomRange, return: true)));
$request->session()->put('start', $start);
Log::debug(sprintf('Set start to %s', $start->format('Y-m-d H:i:s')));
// Log::debug(sprintf('Set start to %s', $start->format('Y-m-d H:i:s')));
$request->session()->put('end', $end);
Log::debug(sprintf('Set end to %s', $end->format('Y-m-d H:i:s')));
// Log::debug(sprintf('Set end to %s', $end->format('Y-m-d H:i:s')));
if ('true' === $request->input('redirect')) {
return redirect(route('index').$this->requestFrom);
}
+3 -3
View File
@@ -80,10 +80,10 @@ class Authenticate
protected function authenticate($request, array $guards)
{
if (0 === count($guards)) {
Log::debug('in Authenticate::authenticate() with zero guards.');
// Log::debug('in Authenticate::authenticate() with zero guards.');
// There are no guards defined, go for the default guard:
if (auth()->check()) {
Log::debug('User is authenticated.');
//Log::debug('User is authenticated.');
$user = auth()->user();
$this->validateBlockedUser($user, $guards);
@@ -146,6 +146,6 @@ class Authenticate
throw new AuthenticationException('Blocked account.', $guards);
}
Log::debug(sprintf('User #%d is not blocked.', $user->id));
// Log::debug(sprintf('User #%d is not blocked.', $user->id));
}
}
+4 -4
View File
@@ -32,7 +32,7 @@ class Navigation
public static function menuItemActive(string $route): string
{
$name = Route::getCurrentRoute()->getName() ?? '';
Log::debug(sprintf('menuItemActive("%s" = "%s")', $route, $name));
// Log::debug(sprintf('menuItemActive("%s" = "%s")', $route, $name));
if ($name === $route) {
return 'active';
}
@@ -43,7 +43,7 @@ class Navigation
public static function menuItemActivePartial(string $route): string
{
$name = Route::getCurrentRoute()->getName() ?? '';
Log::debug(sprintf('menuItemActivePartial("%s" starts with "%s")', $name, $route));
// Log::debug(sprintf('menuItemActivePartial("%s" starts with "%s")', $name, $route));
if (str_starts_with($name, $route)) {
return 'active';
}
@@ -54,7 +54,7 @@ class Navigation
public static function menuOpenPartial(string $route): string
{
$name = Route::getCurrentRoute()->getName() ?? '';
Log::debug(sprintf('menuOpenPartial("%s" starts with "%s")', $name, $route));
// Log::debug(sprintf('menuOpenPartial("%s" starts with "%s")', $name, $route));
if (str_starts_with($name, $route)) {
return 'menu-open';
}
@@ -65,7 +65,7 @@ class Navigation
public static function menuSubItemActive(string $route, string $objectType): string
{
$name = Route::getCurrentRoute()->getName() ?? '';
Log::debug(sprintf('menuSubItemActive("%s" = "%s","%s" = "%s")', $route, $name, $objectType, Route::getCurrentRoute()->parameter('objectType')));
// Log::debug(sprintf('menuSubItemActive("%s" = "%s","%s" = "%s")', $route, $name, $objectType, Route::getCurrentRoute()->parameter('objectType')));
if ($name === $route && $objectType === Route::getCurrentRoute()->parameter('objectType')) {
return 'active';
}