本番でのレールロギングのデフォルトの動作は、すべてのパーシャルのレンダリングを出力しないことです。これは開発段階には記録されますが、運用環境には記録されません。レールからパーツのレンダリングを非表示にする
しかし、私はこれをプロダクションで見ていますが、それを削除する方法がわかりません。私のログはあまりにも騒々しいです。私のプロダクション環境は、Unicornを稼動し、Papertrailを使用してログを表示するHerokuです。私はユニコーンがログにいくつかのグラグラのものをして知っているし、彼らは私が私のproduction.rbにこれを追加する必要がありました最初の場所で正常に動作し取得する:
config.logger = Logger.new(STDOUT)
config.logger.level = Logger.const_get('INFO')
(ここで説明:http://help.papertrailapp.com/kb/configuration/unicorn)を
しかし、たとえで私はすべての私のログにこれらの巨大なブロックを見ているLOG_LEVEL INFO:
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.7ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (2.1ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (4.8ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.3ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (0.4ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (4.4ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.3ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (0.3ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (1.8ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.4ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (4.6ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (2.1ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.3ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (0.4ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (4.1ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.2ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (1.8ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (6.0ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.5ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (0.8ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_category.html.erb (1.9ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_caption.html.erb (0.3ms)
Jun 25 22:15:15 tacktile app/web.1: Rendered photos/pieces/_rights.html.erb (0.7ms)
はあなたを持っているあなたのconfig /環境/ development.rbでこれを試してみてください完了 'heroku config:add LOG_LEVEL =" info "'? – David
David、はい。そして私は "デバッグ"と "情報"を設定して冗長性が変わることを確認しようとしました。確かにそうです。しかし、 "情報"レベルでさえ、私はまだすべてのこれらのレンダリングされたステートメントを取得します。私はそれをさらに下げて隠すことができると確信しています。しかし、冗長性は素晴らしいです*すべての部分的にこれらの "レンダリング"ステートメントを除いて*。私はそれらを隠す方法を理解したいと思います。 –
この回答もご覧ください:http://stackoverflow.com/a/12003652/514483 – robd