Permalink
Browse files

Ensure device option is not passed as option.

  • Loading branch information...
netzpirat committed Jan 22, 2013
1 parent a20b8b2 commit 34a47beb7865551b461190fa0a46627781456af9
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/guard/ui.rb
View
@@ -16,15 +16,18 @@ class << self
# Get the Guard::UI logger instance
#
def logger
- @logger ||= Lumberjack::Logger.new(self.options[:device], self.options)
+ @logger ||= begin
+ options = self.options.dup
+ Lumberjack::Logger.new(options.delete(:device) || $stderr, options)
+ end
end
# Get the logger options
#
# @return [Hash] the logger options
#
def options
- @options ||= { :device => $stderr, :level => :info, :template => ':time - :severity - :message', :time_format => '%H:%M:%S' }
+ @options ||= { :level => :info, :template => ':time - :severity - :message', :time_format => '%H:%M:%S' }
end
# Set the logger options

0 comments on commit 34a47be

Please sign in to comment.