Replace Logger static class with Log class

This commit is contained in:
Alex Cabal 2022-06-17 11:24:54 -05:00
parent f7558eab3a
commit 934545c191
6 changed files with 73 additions and 69 deletions

View file

@ -63,10 +63,10 @@ class Email{
}
if(SITE_STATUS == SITE_STATUS_DEV){
Logger::WriteErrorLogEntry('Sending mail to ' . $this->To . ' from ' . $this->From);
Logger::WriteErrorLogEntry('Subject: ' . $this->Subject);
Logger::WriteErrorLogEntry($this->Body);
Logger::WriteErrorLogEntry($this->TextBody);
Log::WriteErrorLogEntry('Sending mail to ' . $this->To . ' from ' . $this->From);
Log::WriteErrorLogEntry('Subject: ' . $this->Subject);
Log::WriteErrorLogEntry($this->Body);
Log::WriteErrorLogEntry($this->TextBody);
}
else{
$phpMailer->Send();
@ -74,7 +74,7 @@ class Email{
}
catch(Exception $ex){
if(SITE_STATUS != SITE_STATUS_DEV){
Logger::WriteErrorLogEntry('Failed sending email to ' . $this->To . ' Exception: ' . $ex->errorMessage() . "\n" . ' Subject: ' . $this->Subject . "\nBody:\n" . $this->Body);
Log::WriteErrorLogEntry('Failed sending email to ' . $this->To . ' Exception: ' . $ex->errorMessage() . "\n" . ' Subject: ' . $this->Subject . "\nBody:\n" . $this->Body);
}
return false;