Sha256: 4b7193d29a83ead1a7e59e845d1afc130981f10001ba6b12ee45e51bc5e883e3

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

class PostageApp::Logger < ::Logger
  # == Instance Methods =====================================================
  
  def format_message(severity, datetime, progname, msg)
    "[%s] %s\n" % [
      datetime.strftime('%m/%d/%Y %H:%M:%S %Z'),
      case (msg)
      when PostageApp::Request
        "REQUEST [#{msg.url}]\n #{msg.arguments_to_send.to_json}"
      when PostageApp::Response
        "RESPONSE [#{msg.status} #{msg.uid} #{msg.message}]\n #{msg.data.to_json}"
      else
        msg
      end
    ]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
postageapp-1.4.2 lib/postageapp/logger.rb
postageapp-1.4.1 lib/postageapp/logger.rb
postageapp-1.4.0 lib/postageapp/logger.rb
postageapp-1.3.1 lib/postageapp/logger.rb
postageapp-1.3.0 lib/postageapp/logger.rb