crystal-lang-tools/scry

Initial debug logs not being output

bmulvihill opened this issue · 1 comments

Currently we log the messages coming from the LSP client for debugging purposes here:

scry/src/scry/request.cr

Lines 43 to 47 in 26a1e43

private def read_content
@content = @io.gets(content_length)
Log.logger.debug(@content)
@content
end

The problem is we receive some messages (i.e. initialization and user configs) prior to the log level being set by the User settings (which is how we currently change the log level). The default log level is INFO so these messages will never get logged.

Also diagnostic responses are not logged, may be related, WDYT?