Permalink
Browse files

Use the already defined Logger instance.

  • Loading branch information...
1 parent a1cd05a commit f4c39b8f1bae21264daa3d4c4eb06c75df30be83 Glenn Gillen committed Oct 4, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 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(

0 comments on commit f4c39b8

Please sign in to comment.