1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Add debug logging

This commit is contained in:
Hillel Coren 2018-04-24 16:20:38 +03:00
parent 99347c853a
commit acb3d0718b
2 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,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) {