This is a noob question.
What if I want to add logging to the java script application, which is running in a browser (IE, FF, etc.) ? As I understand I can not save log files in the client host. So, I have only two options: display my logging information in a new browser window (like "blackbird") or send the logging to the server.
Is it correct? What kind of logging do they usually use?
You can't "store" log files on client host. You can open a window and visualize it, but you (assuming you are running the Web Application) will never see it.
If you absolutely must get client side logs, you need to send them back to the server using AJAX. Here's a blog post I really liked about it.
Another possibility is the jsnlog library http://js.jsnlog.com/ It will let you send client side logs to the server.
Take a look at https://log4sure.com (disclosure: I created it) - but it is really useful, check it out and decide for yourself. It allows you to log errors/event and also lets you create your custom log table. It stores everything on its own server so you don't have to. It also allows you to monitor your logs real-time. And the best part, its free.
You can also use bower to install it, use bower install log4sure
The set up code is really easy too: