diff --git a/smpt.services.yml b/smpt.services.yml
new file mode 100644
index 0000000..b3347ef
--- /dev/null
+++ b/smpt.services.yml
@@ -0,0 +1,5 @@
+services:
+  smtp.logger.channel:
+    class: Drupal\Core\Logger\LoggerChannel
+    factory: logger.factory:get
+    arguments: ['smtp']
diff --git a/src/Plugin/Mail/SMTPMailSystem.php b/src/Plugin/Mail/SMTPMailSystem.php
index 04dd1cd..4cc4640 100644
--- a/src/Plugin/Mail/SMTPMailSystem.php
+++ b/src/Plugin/Mail/SMTPMailSystem.php
@@ -8,9 +8,12 @@
 namespace Drupal\smtp\Plugin\Mail;
 
 use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Mail\MailInterface;
 use Drupal\Core\Mail\MailFormatHelper;
+use Drupal\Core\Mail\MailInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\smtp\PHPMailer\PHPMailer;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Modify the drupal mail system to use smtp when sending emails.
@@ -22,15 +25,26 @@ use Drupal\smtp\PHPMailer\PHPMailer;
  *   description = @Translation("Sends the message, using SMTP.")
  * )
  */
-class SMTPMailSystem implements MailInterface {
+class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
   protected $AllowHtml;
   protected $smtpConfig;
 
   /**
+   * Logger
+   * @var LoggerInterface
+   */
+  protected $logger;
+
+  /**
    * Constructs a SMPTMailSystem object.
+   * @param array $configuration
+   * @param $plugin_id
+   * @param $plugin_definition
+   * @param \Psr\Log\LoggerInterface $logger
    */
-  public function __construct() {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger) {
     $this->smtpConfig = \Drupal::config('smtp.settings');
+    $this->logger = $logger;
   }
 
   /**
@@ -90,10 +104,10 @@ class SMTPMailSystem implements MailInterface {
 
     // Set SMTP module email from.
     if (\Drupal::service('email.validator')->isValid($this->smtpConfig->get('smtp_from'))) {
-        $from = $this->smtpConfig->get('smtp_from');
-        $headers['Sender'] = $from;
-        $headers['Return-Path'] = $from;
-        $headers['Reply-To'] = $from;
+      $from = $this->smtpConfig->get('smtp_from');
+      $headers['Sender'] = $from;
+      $headers['Return-Path'] = $from;
+      $headers['Reply-To'] = $from;
     }
 
     // Defines the From value to what we expect.
@@ -159,25 +173,25 @@ class SMTPMailSystem implements MailInterface {
 
               // The message includes an HTML part w/inline attachments.
               $mailer->ContentType = $content_type = 'multipart/related; boundary="' . $boundary . '"';
-            break;
+              break;
             case 'multipart/alternative':
               // The message includes both a plain text and an HTML part.
               $mailer->ContentType = $content_type = 'multipart/alternative';
 
               // Get the boundary ID from the Content-Type header.
               $boundary = $this->_get_substring($value, 'boundary', '"', '"');
-            break;
+              break;
             case 'multipart/mixed':
               // The message includes one or more attachments.
               $mailer->ContentType = $content_type = 'multipart/mixed';
 
               // Get the boundary ID from the Content-Type header.
               $boundary = $this->_get_substring($value, 'boundary', '"', '"');
-            break;
+              break;
             default:
               // Everything else is unsuppored by PHPMailer.
               drupal_set_message(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', array('%header' => "Content-Type: $value")), 'error');
-              watchdog('smtp', 'The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', array('%header' => "Content-Type: $value"), WATCHDOG_ERROR);
+              $this->logger->error(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', array('%header' => "Content-Type: $value")));
 
               // Force the Content-Type to be text/plain.
               $mailer->IsHTML(FALSE);
@@ -456,7 +470,7 @@ class SMTPMailSystem implements MailInterface {
       'from' => $from,
     );
     if ($this->smtpConfig->get('smtp_queue')) {
-      watchdog('smtp', 'Queue sending mail to: @to', array('@to' => $to));
+      $this->logger->info(t('Queue sending mail to: @to', array('@to' => $to)));
       smtp_send_queue($mailerArr);
     }
     else {
@@ -606,4 +620,22 @@ class SMTPMailSystem implements MailInterface {
 
     return $components;
   }
+
+  /**
+   * Creates an instance of the plugin.
+   *
+   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
+   *   The container to pull out services used in the plugin.
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin ID for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   *
+   * @return static
+   *   Returns an instance of this plugin.
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('smtp.logger.channel'));  }
 }
