lsp-2.2.0.0: Haskell library for the Microsoft Language Server Protocol

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.LSP.Logging

Synopsis

- logToShowMessage :: MonadLsp c m => LogAction m (WithSeverity Text)
- logToLogMessage :: MonadLsp c m => LogAction m (WithSeverity Text)
- defaultClientLogger :: MonadLsp c m => LogAction m (WithSeverity Text)

# Documentation

logToShowMessage :: MonadLsp c m => LogAction m (WithSeverity Text) #

Logs messages to the client via `window/showMessage`.

logToLogMessage :: MonadLsp c m => LogAction m (WithSeverity Text) #

Logs messages to the client via `window/logMessage`.

defaultClientLogger :: MonadLsp c m => LogAction m (WithSeverity Text) #

A `sensible` log action for logging messages to the client:

- Shows `Error` logs to the user via `window/showMessage`
- Logs `Info` and above logs in the client via `window/logMessage`

If you want finer control (e.g. the ability to log `Debug` logs based on a flag, or similar), then do not use this and write your own based on `logToShowMessage` and `logToLogMessage`.