Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/autotelik/datashift
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Statter committed Nov 28, 2016
2 parents c92ad7c + 8521acc commit 328b756
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/datashift/logging.rb
Expand Up @@ -32,7 +32,11 @@ def add_file(target)
end

def verbose
add(STDOUT)
target = "stdout"
unless @names.include?(target)
add(STDOUT)
@names << target
end
end

def method_missing(method, *args, &block)
Expand Down Expand Up @@ -64,7 +68,7 @@ def logger
end

def verbose
@verbose_logger ||= logger.add(STDOUT)
@verbose_logger ||= logger.verbose
end

private
Expand All @@ -76,7 +80,7 @@ def open( log = 'datashift.log')

ActiveRecord::Base.logger = MultiIO.instance if defined?(ActiveRecord) && ActiveRecord::Base.logger

verbose if(DataShift::Configuration.call.verbose)
MultiIO.instance.verbose if(DataShift::Configuration.call.verbose)

MultiIO.instance
end
Expand Down

0 comments on commit 328b756

Please sign in to comment.