Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the already defined Logger instance.

  • Loading branch information...
commit f4c39b8f1bae21264daa3d4c4eb06c75df30be83 1 parent a1cd05a
@glenngillen glenngillen authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/campaign_monitor_subscriber/subscription_hooks.rb
View
7 lib/campaign_monitor_subscriber/subscription_hooks.rb
@@ -6,11 +6,8 @@ module SubscriptionHooks
extend ActiveSupport::Concern
included do
- require 'logger'
- @@log = Logger.new('log/cm_subscriber.log')
-
after_create do |record|
- @@log.debug "\n* Adding '#{record.cms_email}' to CM"
+ logger.debug "\n* Adding '#{record.cms_email}' to CM"
begin
CreateSend::Subscriber.add(
@@ -27,7 +24,7 @@ module SubscriptionHooks
after_destroy do |record|
- @@log.debug "\n* Removing '#{record.cms_email}' from CM"
+ logger.debug "\n* Removing '#{record.cms_email}' from CM"
begin
s = CreateSend::Subscriber.new(
Please sign in to comment.
Something went wrong with that request. Please try again.