Just to make sure it’s clear what you’re referring to, when you say it’s “going crazy” do you just mean that there are more events being written to the file than you expected, or is it writing something specific in there that is concerning to you?
What you’ve shown here seems to just be the normal log output of the language server, which the program is writing to stderr. The language server does have a -log-file option to its serve command which can send that information to a specific file, overriding the default behavior of writing to stderr. If you don’t care to see the logs at all then I suppose you could send them to /dev/null or similar, so that they’ll be discarded entirely.
Thanks for your response, yes when I said going crazy I was referring that it writes thousands of lines and they all seem to be reported as [ERROR] so I ultimately thought that there is something wrong as I am experiencing very slow performance with LSP server in neovim. It takes about 5-10 seconds before autocomplete starts to work.
Out of curiosity why is it creating those events under [ERROR]?
I’m not familiar with this Neovim LSP integration you are using, but as far as I can tell from the messaging it seems to be your Neovim plugin that is deciding to classify them as error events, not the language server.
The language server is writing its logs to the “stderr” standard file handle, and so I suppose it is reasonable for the LSP plugin to treat any data written to that as being an error, but the language server itself doesn’t distinguish between different log levels so not everything it writes to its logs is being classified as an error by that plugin.
There isn’t any standard filehandle for logging in Unix, so terraform-ls uses stderr for that because there isn’t any obviously better place without explicit configuration. (The language server protocol can use stdout as the primary communication channel with the client, so that isn’t an option here.)