在生产中要放入什么产品

时间:2019-01-15 21:21:40

标签: javascript error-handling try-catch

在调试我的应用程序时,请执行以下操作。

<%= render :partial => 'shared/side_menu' %> <div class="container-main"> <br/> <div class="content-container your-sites"> <div class="header"> <div class="icon-circle"><div class="icon"><%= image_tag "my-providers-2x.png" %></div></div> <div class="title">Your Patients</div> </div><!--header--> <div class="body"> <div class="body"> <% if @active_patients.count > 0 %> <table> <thead> <tr> <th>Patient Name</th> <th>Actions</th> </tr> </thead> <tbody> <% @active_patients.each do |list| %> <tr> <td><%= list.patient.role.user.first_name %> <%= list.patient.role.user.last_name %></td> <td> <%= link_to patients_path(patient_id) %> </td> </tr> <% end %> </tbody> </table> <% else %> <div class="no-records"> <%= image_tag "icon-no-records", class: "image" %> <div class="text">You have no patients.</div> </div><!--no-records--> <% end %> </div><!--body--> </div> </div>

哪个很好,但是我应该在生产中做什么?我真的不想保留所有这些console.logs。

谢谢。

1 个答案:

答案 0 :(得分:1)

通常,在生产中,我们将使用某种错误记录机制,而我使用最多的是ELMAH。或自己实现其他一些日志记录机制并将其记录下来,以便您可以随时检查它。

相关问题