Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails应用程序的“每X”日志记录_Ruby On Rails_Ruby_Ruby On Rails 3_Logging - Fatal编程技术网

Ruby on rails Rails应用程序的“每X”日志记录

Ruby on rails Rails应用程序的“每X”日志记录,ruby-on-rails,ruby,ruby-on-rails-3,logging,Ruby On Rails,Ruby,Ruby On Rails 3,Logging,我希望在应用程序中构建一些自定义日志信息,以便稍后在其他应用程序的其他部分中使用。最简单地说,这是一个“每用户”日志 最好的办法是什么 1. log to dev/production log, then find some way to parse that when I need to information 2. create a custom log file, then parse that when needed 3. log the info to a db text field

我希望在应用程序中构建一些自定义日志信息,以便稍后在其他应用程序的其他部分中使用。最简单地说,这是一个“每用户”日志

最好的办法是什么

1. log to dev/production log, then find some way to parse that when I need to information
2. create a custom log file, then parse that when needed
3. log the info to a db text field with the user
我已经开始研究这一点,并且所有3个都是可行的,我很好奇其他人是如何以标准化的方式解决这一问题的,这是我没有想到的


重申一下:对于rails应用程序,按实体记录日志的最佳方法是什么?

通过学习log4rand常规记录器和完成我需要的工作来解决。没有魔法