Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有完整的 ajax 请求功能的 rails 2 应用程序。我想在日志文件中记录 ajax 请求失败,就像我们可以在 cron 方法中使用 begin rescue 块一样。有没有办法用方法名记录ajax失败请求?
对服务器的所有请求(包括 ajax 请求)都应记录在日志文件中。再次检查您的日志文件,它也应该包含 ajax 请求的条目。