1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Fixes for logging

This commit is contained in:
David Bomba 2021-01-15 10:50:27 +11:00
parent 1f97744083
commit 6857393ff6

View File

@ -21,17 +21,18 @@
*/
function nlog($output, $context = []): void
{
$trace = debug_backtrace();
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info(print_r($trace[1]['class'],1), []);
if (!config('ninja.expanded_logging'))
return;
if (config('ninja.expanded_logging')) {
if (gettype($output) == 'object') {
$output = print_r($output, 1);
}
$trace = debug_backtrace();
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info(print_r($trace[1]['class'],1), []);
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);
}
}
if (!function_exists('ray')) {