module Crystal module Processors class HTTPLogger < Processor def call if workspace.request? and workspace.params? method, path, ip, time, format = workspace.request.request_method, workspace.path, workspace.request.ip, (workspace.start_time || Time.now), workspace.params.format logger.info "Started '#{path}' as '#{format}' (for #{ip} at #{time.to_s} with #{method})" end next_processor.call end end end end