1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Add debug logging

This commit is contained in:
Hillel Coren 2018-04-24 16:20:05 +03:00
parent dba86306a5
commit 71e8b733ea
2 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,13 @@ class AccountGateway extends EntityModel
*/
protected $dates = ['deleted_at'];
/**
* @var array
*/
protected $hidden = [
'config'
];
/**
* @return mixed
*/

View File

@ -374,6 +374,13 @@ class InvoiceRepository extends BaseRepository
$account = $invoice ? $invoice->account : \Auth::user()->account;
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
if (Utils::isNinjaProd() && ! Utils::isReseller()) {
$copy = json_decode( json_encode($data), true);
$copy['data'] = false;
$logMessage = date('r') . ' account_id: ' . $account->id . ' ' . json_encode($copy);
@file_put_contents(storage_path('logs/invoice-repo.log'), $logMessage, FILE_APPEND);
}
$isNew = ! $publicId || $publicId == '-1';
if ($invoice) {