Sha256: 14a102a421ef86243d424a00d4e1fe9a2a948e6446301c00fa1deb9fbbcf217c

Contents?: true

Size: 455 Bytes

Versions: 7

Compression:

Stored size: 455 Bytes

Contents

module Rbfs
  class Logger
    attr_reader :config

    def initialize(config)
      @config = config
    end

    def info(msg)
      puts "\033[0;32m#{msg}\033[00m"
    end

    def puts(msg)
      $stdout.puts "#{msg}"
    end

    def error(msg)
      puts "\033[0;31m#{msg}\033[00m"
    end

    def critical(msg)
      puts "\033[0;31m#{msg}\033[00m"
      exit 1
    end

    def notice(msg)
      puts "\033[0;33m#{msg}\033[00m"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rbfs-1.0.17 lib/rbfs/logger.rb
rbfs-1.0.16 lib/rbfs/logger.rb
rbfs-0.0.15 lib/rbfs/logger.rb
rbfs-0.0.14 lib/rbfs/logger.rb
rbfs-0.0.10 lib/rbfs/logger.rb
rbfs-0.0.9 lib/rbfs/logger.rb
rbfs-0.0.8 lib/rbfs/logger.rb