mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 04:16:38 -04:00
Replace Logger static class with Log class
This commit is contained in:
parent
f7558eab3a
commit
934545c191
6 changed files with 73 additions and 69 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue