dev: loggy

This commit is contained in:
Andras Bacsai
2024-10-17 10:04:49 +02:00
parent f600c1b37d
commit 55cae39e55
4 changed files with 96 additions and 1 deletions

View File

@@ -4010,3 +4010,18 @@ function loadConfigFromGit(string $repository, string $branch, string $base_dire
// continue
}
}
function loggy($message = null, array $context = [])
{
if (!isDev()) {
return;
}
if (function_exists('ray') && config('app.debug')) {
ray($message, $context);
}
if (is_null($message)) {
return app('log');
}
return app('log')->debug($message, $context);
}