Permalink
Browse files

+ warn

  • Loading branch information...
1 parent 51006b5 commit f08ced2a3a7a1eddc409b6f7b1e41fb0e3aa8313 Florian René Hanke committed Oct 22, 2012
Showing with 32 additions and 13 deletions.
  1. +15 −4 server/lib/picky/loggers/concise.rb
  2. +4 −6 server/lib/picky/loggers/silent.rb
  3. +13 −3 server/lib/picky/loggers/verbose.rb
@@ -22,22 +22,33 @@ def load(*)
progress
end
+ def progress type = '.'
+ write type
+ end
+
def adapt_for_logger
super
def info text
output.info text
end
- def progress type = '.'
- write type
+ def warn text
+ output.warn text
+ end
+ def write message
+ output << message
end
end
def adapt_for_io
super
def info text
+ output.write text
+ end
+ def warn text
output.puts text
+ flush
end
- def progress type = '.'
- write type
+ def write message
+ output.write message
end
end
@@ -31,23 +31,21 @@ def adapt_for_logger
def flush
end
- def write message
- output << message
- end
end
def adapt_for_io
def flush
output.flush
end
- def write message
- output.write message
- end
end
def info(*)
end
+ def warn(*)
+
+ end
+
def write(*)
end
@@ -22,21 +22,31 @@ def load category
timed_exclaim %Q{ "#{category.identifier}": Loading index from cache.}
end
- # Puts a text in the form:
- # 12:34:56: text here
- #
def adapt_for_logger
super
def timed_exclaim text
output.info "#{Time.now.strftime("%H:%M:%S")}: #{text}"
end
+ def warn text
+ output.warn text
+ end
+ def write message
+ output << message
+ end
end
def adapt_for_io
super
def timed_exclaim text
output.puts "#{Time.now.strftime("%H:%M:%S")}: #{text}"
flush
end
+ def warn text
+ output.puts text
+ flush
+ end
+ def write message
+ output.write message
+ end
end
end

0 comments on commit f08ced2

Please sign in to comment.