2008-09-29 1 views

답변

4

당신의 application.rb 파일 다음

before_filter :benchmark_log 

    def benchmark_log 
    File.open("request_log.txt","a") do |f| 
     f.puts request.method.to_s + " '" + request.request_uri + "', " + params.except(:action).except(:controller).inspect.gsub(/(^\{|\}$)/,"") 
    end 
    end 

당신이 당신의 브라우저에서 여러 페이지를 방문 할 수 있습니다, 세션 스크립트 응용 프로그램 루트 디렉토리

에 request_log.txt 파일에 기록됩니다에이 코드를 추가합니다