Updates for logging

This commit is contained in:
David Bomba 2025-04-26 11:20:22 +10:00
parent 140895c2d7
commit fbecca6950
3 changed files with 4 additions and 3 deletions

View File

@ -76,9 +76,10 @@ class EmailSuccess extends GenericMixedMetric
*/
public $string_metric8 = '';
public function __construct($string_metric7 = '', $string_metric8 = '')
public function __construct($string_metric7 = '', $string_metric8 = '', string $string_metric9 = '')
{
$this->string_metric7 = $string_metric7;
$this->string_metric8 = $string_metric8;
$this->string_metric9 = $string_metric9;
}
}

View File

@ -153,7 +153,7 @@ class NinjaMailerJob implements ShouldQueue
$this->incrementEmailCounter();
LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject))
LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject, $this->nmo->mailable->viewData['text_body'] ?? ''))
->send();
} catch (\Symfony\Component\Mailer\Exception\TransportException $e) {

View File

@ -289,7 +289,7 @@ class Email implements ShouldQueue
$this->incrementEmailCounter();
LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject))
LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject, $this->mailable->viewData['text_body'] ?? ''))
->send();
} catch (\Symfony\Component\Mailer\Exception\TransportException $e) {