richterger / Perl-LanguageServer

Language Server for Perl
Other
222 stars 53 forks source link

Respect logging-related configuration settings #97

Closed schellj closed 1 year ago

schellj commented 3 years ago

The extension readme (https://github.com/richterger/Perl-LanguageServer/blob/master/clients/vscode/perl/README.md) lists perl.logFile and perl.logLevel as supported settings, but the server doesn't currently respect those configuration settings (log file and log level can only be set by the --log-file and --log-level server command line arguments). This PR makes the server respect those logging-related configuration settings.

richterger commented 3 years ago

LogLevel and logFile are passed as command line options to the server, so they are available before any communication between client and server. That's done in the run method of LanguageServer.pm and it's working for me as expected. So I don't see the benefit of your pull request?

schellj commented 3 years ago

Hi @richterger thanks for taking a look at the PR.

I'm not a VSCode user, but it does look like the extension in this repo for that editor handles the logLevel and logFile settings as you describe. The marginal benefit of this PR would be that other clients wouldn't have to handle the logLevel and logFile differently than the other settings handled by didChangeConfiguration (such as fileFilter or ignoreDirs). Understood if you don't think it's worth making the change.

richterger commented 3 years ago

ok, now I understand. I will check the compatibility with VScode and apply it afterwards