mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 01:44:33 -04:00
analytics
This commit is contained in:
parent
042f778fb4
commit
592aba6bb0
@ -45,10 +45,11 @@ class DbQuery
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $string_metric5 = 'uri';
|
public $string_metric5 = 'method';
|
||||||
|
|
||||||
public $string_metric6 = 'uri';
|
public $string_metric6 = 'url';
|
||||||
|
|
||||||
|
public $string_metric7 = 'ip_address';
|
||||||
/**
|
/**
|
||||||
* The counter
|
* The counter
|
||||||
* set to 1.
|
* set to 1.
|
||||||
@ -59,10 +60,11 @@ class DbQuery
|
|||||||
|
|
||||||
public $double_metric2 = 1;
|
public $double_metric2 = 1;
|
||||||
|
|
||||||
public function __construct($string_metric5, $string_metric6, $int_metric1, $double_metric2) {
|
public function __construct($string_metric5, $string_metric6, $int_metric1, $double_metric2, $string_metric7) {
|
||||||
$this->int_metric1 = $int_metric1;
|
$this->int_metric1 = $int_metric1;
|
||||||
$this->string_metric5 = $string_metric5;
|
$this->string_metric5 = $string_metric5;
|
||||||
$this->string_metric6 = $string_metric6;
|
$this->string_metric6 = $string_metric6;
|
||||||
$this->double_metric2 = $double_metric2;
|
$this->double_metric2 = $double_metric2;
|
||||||
|
$this->string_metric7 = $string_metric7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ class QueryLogging
|
|||||||
// if($count > 50)
|
// if($count > 50)
|
||||||
nlog($queries);
|
nlog($queries);
|
||||||
|
|
||||||
LightLogs::create(new DbQuery($request->method(), $request->url(), $count, $time))
|
LightLogs::create(new DbQuery($request->method(), $request->url(), $count, $time, request()->ip()))
|
||||||
->batch();
|
->batch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user