abingham/emacs-ycmd

Error messages still too noisy

r4nt opened this issue · 10 comments

r4nt commented

I get complaints from a lot of users that the error message like:
REQUEST [error] Error (error) while connecting to http://127.0.0.1:38987/completions.
REQUEST [error] Error (error) while connecting to http://127.0.0.1:38987/event_notification. [26 times]
Are too noisy. Can we do something about this?

@Valloric just fyi

Depending on the errors involved, this could be a client-side issue.

For event notification especially, ycmd will send back an error if the file is already being compiled. That error is completely ignorable though and shouldn't be presented to the user.

That's off the top of my head without more information about the errors.

Besides, ycmd will display"contacting host 127.0.0.1:xxxx" in the mode line every several seconds, which is noisy too...

Yes, we can probably do something about these. I just need to find some time to look into it.

@r4nt It looks like you can squash a lot of these messages by setting ycmd-request-msg-level to -1. Try that out and let me know if it works for you. This is a bit suboptimal, of course, because it might hide real errors, but that doesn't seem too likely, and it's far less of an issue than the noise problem.

@zhuzhongshu Setting the msg-level probably won't address the "contact host" messages. That seems to be buried down in the guts of the emacs http stack, but I'll see if I can figure it out.

@zhuzhongshu Try setting url-show-status to nil. It looks like this prevents the "Contacting host" messages. Note that the documentation string for url-show-status seems incomplete or misleading on 24.4. See url-lazy-message if you want to see how it's really used.

It works! Many thanks @abingham .

I've added a section to the README for this issue. I'll update it if it turns out that the advice is bad, and feel free to suggest any other additions you come up with.

@r4nt Have you had a chance to try the ycmd-request-msg-level trick I mentioned above? If that works to your satisfaction then I'll close this out.

r4nt commented

Yep, works. Thanks!

Thanks :)