Sha256: 82b2bef588c6db8c9eb35c4a223363fc6a65b803078d8e5488c70881dc1e2437

Contents?: true

Size: 904 Bytes

Versions: 32

Compression:

Stored size: 904 Bytes

Contents

module Picky
  
  module Loggers
    
    # The verbose logger outputs all information.
    #
    class Verbose < Silent
      
      def info text
        timed_exclaim text
      end
      
      def tokenize index_or_category, prepared_file
        timed_exclaim %Q{  "#{index_or_category.identifier}": Tokenized -> #{prepared_file.path.gsub("#{PICKY_ROOT}/", '')}.}
      end
      
      def dump category
        timed_exclaim %Q{  "#{category.identifier}": Dumped -> #{category.index_directory.gsub("#{PICKY_ROOT}/", '')}/#{category.name}_*.}
      end
      
      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 timed_exclaim text
        io.puts "#{Time.now.strftime("%H:%M:%S")}: #{text}"
        flush
      end
      
    end
    
  end
  
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
picky-4.7.0 lib/picky/loggers/verbose.rb
picky-4.6.6 lib/picky/loggers/verbose.rb
picky-4.6.5 lib/picky/loggers/verbose.rb
picky-4.6.4 lib/picky/loggers/verbose.rb
picky-4.6.3 lib/picky/loggers/verbose.rb
picky-4.6.2 lib/picky/loggers/verbose.rb
picky-4.6.1 lib/picky/loggers/verbose.rb
picky-4.6.0 lib/picky/loggers/verbose.rb
picky-4.5.12 lib/picky/loggers/verbose.rb
picky-4.5.11 lib/picky/loggers/verbose.rb
picky-4.5.10 lib/picky/loggers/verbose.rb
picky-4.5.9 lib/picky/loggers/verbose.rb
picky-4.5.8 lib/picky/loggers/verbose.rb
picky-4.5.7 lib/picky/loggers/verbose.rb
picky-4.5.6 lib/picky/loggers/verbose.rb
picky-4.5.5 lib/picky/loggers/verbose.rb
picky-4.5.4 lib/picky/loggers/verbose.rb
picky-4.5.3 lib/picky/loggers/verbose.rb
picky-4.5.2 lib/picky/loggers/verbose.rb
picky-4.5.1 lib/picky/loggers/verbose.rb