Skip to content

Commit

Permalink
Ensure device option is not passed as option.
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Jan 22, 2013
1 parent a20b8b2 commit 34a47be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/guard/ui.rb
Expand Up @@ -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
Expand Down

0 comments on commit 34a47be

Please sign in to comment.