1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Helpers/Generic.php

32 lines
746 B
PHP
Raw Normal View History

2020-12-24 17:01:34 +01:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
2020-12-24 17:01:34 +01:00
*
* @license https://opensource.org/licenses/AAL
*/
/**
* Simple helper function that will log into "invoiceninja.log" file
* only when extended logging is enabled.
*
2020-12-25 12:29:42 +01:00
* @param mixed $output
* @param array $context
*
* @return void
2020-12-24 17:01:34 +01:00
*/
function nlog($output, $context = []): void
{
if (config('ninja.expanded_logging')) {
if (gettype($output) == 'object') {
$output = print_r($output, 1);
}
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);
}
}