mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
b879f7a2d9
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
|
31
app/Helpers/Generic.php
Normal file
31
app/Helpers/Generic.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
/**
|
||||
* Simple helper function that will log into "invoiceninja.log" file
|
||||
* only when extended logging is enabled.
|
||||
*
|
||||
* @param mixed $output
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
@ -99,6 +99,11 @@ return [
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
|
||||
'invoiceninja' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/invoiceninja.log'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -136,4 +136,5 @@ return [
|
||||
'base_path' => resource_path('views/pdf-designs/'),
|
||||
],
|
||||
'log_pdf_html' => env('LOG_PDF_HTML', false),
|
||||
'expanded_logging' => env('EXPANDED_LOGGING', false),
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user