Sha256: 348126c9687c1be6b955599a79596f784aa5705dd019f5b4a664ca23d09043be

Contents?: true

Size: 490 Bytes

Versions: 1

Compression:

Stored size: 490 Bytes

Contents

require 'logger'

module OpenSource
  module Utilities
    module Logging
      class Simple < Logger::Formatter
        def call(severity, time, progname, msg)
          "OpenSource: #{msg}\n"
        end
      end

      def logger
        @logger ||= initialize_logger
      end

      private
        def initialize_logger
          logger = Logger.new(STDOUT)
          logger.level = Logger::INFO
          logger.formatter = Simple.new
          logger
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opensource-1.0.0 lib/open_source/utilities/logging.rb