Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.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 4 使用lograge时缺少Rails请求日志_Ruby On Rails 4_Heroku - Fatal编程技术网

Ruby on rails 4 使用lograge时缺少Rails请求日志

Ruby on rails 4 使用lograge时缺少Rails请求日志,ruby-on-rails-4,heroku,Ruby On Rails 4,Heroku,这是为背景工作者工作。对于rails请求,它会在一段时间后停止工作 # config/environments/production.rb config.log_level = :info config.lograge.enabled = true config.lograge.custom_options = lambda do |event| request_params = event.payload[:params].except("controller", "action", "

这是为背景工作者工作。对于rails请求,它会在一段时间后停止工作

# config/environments/production.rb

config.log_level = :info
config.lograge.enabled = true
config.lograge.custom_options = lambda do |event|
  request_params = event.payload[:params].except("controller", "action", "")
  { params: request_params, ip: event.payload[:ip], uid: event.payload[:user_id] }
end
如上所示,只有heroku[路由器]正在登录到标准输出。Lograge不会记录任何内容,除非不时出现以下情况:

2017-01-02T17:05:56.318489+00:00 heroku[router]: at=info method=POST path="/comments/3297684/cheer"
2017-01-02T17:05:55.915014+00:00 heroku[router]: at=info method=GET path="/north-engine-crossfit/feed"
2017-01-02T17:05:56.576926+00:00 heroku[router]: at=info method=GET path="/notifications?"
2017-01-02T17:05:56.455991+00:00 heroku[router]: at=info method=GET path="/assets/fallback/thumb_default.png"
2017-01-02T17:05:56.620939+00:00 heroku[router]: at=info method=GET path="/events/2808332/comments"
2017-01-02T17:05:56.930687+00:00 heroku[router]: at=info method=GET path="/workouts/bar-work-and-some-rowing/results/new?event_id=2808133"
2017-01-02T17:05:57.136227+00:00 heroku[router]: at=info method=GET path="/tfw-helsinki/feed"
2017-01-02T17:05:57.862004+00:00 heroku[router]: at=info method=GET path="/gyms/crossfit-herttoniemi/widgets/info"
2017-01-02T17:05:58.012593+00:00 heroku[router]: at=info method=GET path="/workouts/results/new"
2017-01-02T17:05:57.875231+00:00 heroku[router]: at=info method=GET path="/api/v1/mobile/users/get_notifications_count.json?"
2017-01-02T17:05:58.385305+00:00 heroku[router]: at=info method=POST path="/comments/3297738/cheer"
2017-01-02T17:05:58.514149+00:00 heroku[router]: at=info method=GET path="/events/2808045/comments" 
2017-01-02T17:05:58.562364+00:00 heroku[router]: at=info method=GET path="/events/2809768/comments" 
有人知道为什么请求日志记录不起作用吗

2017-01-02T17:05:56.302136+00:00 app[web.1]: ** [NewRelic][2017-01-02 17:05:56 +0000 web.1 (8)] WARN : Skipping RUM instrumentation. Unable to find <body> tag in first 50000 bytes of document.
017-01-02T17:05:59.018898+00:00 app[worker.2]: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753844) RUNNING
2017-01-02T17:05:59.018913+00:00 app[worker.2]: 2017-01-02T17:05:59+0000: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753844) RUNNING
2017-01-02T17:05:59.035080+00:00 app[worker.2]: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753844) COMPLETED after 0.0161
2017-01-02T17:05:59.035145+00:00 app[worker.2]: 2017-01-02T17:05:59+0000: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753844) COMPLETED after 0.0161
2017-01-02T17:05:59.038990+00:00 app[worker.2]: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753845) RUNNING
2017-01-02T17:05:59.039046+00:00 app[worker.2]: 2017-01-02T17:05:59+0000: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753845) RUNNING
2017-01-02T17:05:59.054456+00:00 app[worker.2]: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753845) COMPLETED after 0.0153
2017-01-02T17:05:59.054508+00:00 app[worker.2]: 2017-01-02T17:05:59+0000: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] Job DeliverDeviceNotification (id=10753845) COMPLETED after 0.0153
2017-01-02T17:05:59.057328+00:00 app[worker.2]: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] 2 jobs processed at 46.3347 j/s, 0 failed
2017-01-02T17:05:59.057383+00:00 app[worker.2]: 2017-01-02T17:05:59+0000: [Worker(host:74f88e14-63db-431d-ab87-8c8a0e031866 pid:4)] 2 jobs processed at 46.3347 j/s, 0 failed