2017-10-17 17 views
0

여기 (DEV 서버) 예 :레일 5 감추기 생산량 고유 요구 식별자의 고유 식별자를 각 요청에 출력하기 전에 표시되는

$ rails s 
=> Booting Puma 
=> Rails 5.0.3 application starting in development on http://localhost:3000 
=> Run `rails server -h` for more startup options 
Puma starting in single mode... 
* Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot 
* Min threads: 5, max threads: 5 
* Environment: development 
* Listening on tcp://0.0.0.0:3000 
Use Ctrl-C to stop 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] Started GET "/plans" for 127.0.0.1 at 2017-10-17 17:06:48 -0300 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <class:ApplicationController> at /Users/tdonatti/Sites/rails/vmsapi/app/controllers/application_controller.rb:10) 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] Processing by PlansController#index as HTML 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 9], 
["LIMIT", 1]] 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] Plan Load (0.4ms) SELECT "plans"."id", "plans"."title", "plans"."nod", "plans"."price", "plans"."status" FROM "plans" 
[5664e61d-73e6-4ce3-af27-d82aa04abebd] Completed 200 OK in 38ms (Views: 9.4ms | ActiveRecord: 7.4ms) 

은 내가 아니라고이 식별자를 [5664e61d-73e6-4ce3-af27-d82aa04abebd]

숨기려 왜 그리고 어떻게 나타나는지 알 수는 있지만, 출력은 매우 시끄럽고 추적하기가 어렵습니다. 설정 파일에서

답변

0

당신은 제거

config.log_tags = [ :uuid ] 

같은 뭔가 log_tags가 설정되어 있어야하고 당신이 가서 잘되어야합니다.

시간이있을 때 로그 태그는 디버깅에 유용합니다 - give this a read.