Sha256: d5341c5c3237627f17cf17686dd568ba3819aa7a8c192ba9d7ba96e195f69ae9

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

module SimpleDeploy
  class SimpleDeployLogger
    
    def initialize(args = {})
      @logger = args[:logger] ||= Logger.new(STDOUT)

      unless args[:logger]
        @logger.datetime_format = "%Y-%m-%d %H:%M:%S"
        @logger.formatter = proc do |severity, datetime, progname, msg|
            "#{datetime}: #{msg}\n"
        end
      end

      @logger
    end

    def debug(msg)
      @logger.debug msg
    end

    def info(msg)
      @logger.info msg
    end

    def error(msg)
      @logger.error msg
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple_deploy-0.3.5 lib/simple_deploy/logger.rb
simple_deploy-0.3.4 lib/simple_deploy/logger.rb
simple_deploy-0.3.3 lib/simple_deploy/logger.rb
simple_deploy-0.3.2 lib/simple_deploy/logger.rb