Laravel logger: Revision history

From AWVVO
Jump to navigationJump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

29 March 2025

  • curprev 16:3916:39, 29 March 2025 Admin talk contribs m 1,278 bytes +303 Examples
  • curprev 16:3816:38, 29 March 2025 Admin talk contribs 975 bytes +975 Created page with "== Custom logger == <syntaxhighlight lang="php" copy line highlight="0"> <?php namespace App\Util; use Illuminate\Support\Facades\Log; class Logger { public static function info(...$args): void { $trace = collect(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)) ->first(fn ($t) => isset($t['file']) && str_contains($t['file'], base_path('app'))); $location = $trace ? basename($trace['file']) . ':' . ($trace['line'] ?? '') ...."