title: How to to log JS errors from a client into kibana?
body: <p>I have web application backed end in NodeJS and <code>logstash/elasticsearch/kibana</code> to handle system logs like <code>(access_error.log, messages.log etc)</code>.</p>
  
  <p>Right now I need to record all JavaScript client side errors into kibana also. What is the best way to do this?</p>
  
  <p><strong>EDIT:</strong> I have to add additional information to this question. As @Jackie Xu provide partial solution to my problem and as follows from my comment:</p>
  
  <blockquote>
    <p>I'm most interested in realizing server-side error handling. I think it's not effective write each error into file. I'm looking for best practices how to make it more performance.</p>
  </blockquote>
  
  <p>I need to handle js error records on server-side more effective than just write into file. May you provide some scenarios how could I increase server-side logging performance?</p>