1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +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 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') { if (gettype($output) == 'object') {
$output = print_r($output, 1); $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); \Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);
}
} }
if (!function_exists('ray')) { if (!function_exists('ray')) {