lib/picky/loggers/concise.rb in picky-4.9.0 vs lib/picky/loggers/concise.rb in picky-4.10.0
- old
+ new
@@ -4,30 +4,14 @@
# The verbose logger outputs little information.
#
class Concise < Silent
- attr_reader :tokenized,
- :dumped,
- :loaded
-
def initialize *args
super *args
-
- reset
end
- def reset
- @tokenized = false
- @dumped = false
- @loaded = false
- end
-
- def info text
- io.write text
- end
-
def tokenize(*)
progress 'T'
end
def dump(*)
@@ -37,10 +21,36 @@
def load(*)
progress
end
def progress type = '.'
- io.write type
+ write type
+ end
+
+ def adapt_for_logger
+ super
+ def info text
+ output.info text
+ end
+ 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 write message
+ output.write message
+ end
end
end
end