Language.LSP.Logging

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

Safe Haskell | None
Language | GHC2021

Language.LSP.Logging

Synopsis

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

# Documentation

logToShowMessage :: forall c (m :: Type -> Type). MonadLsp c m => LogAction m (WithSeverity Text) #

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

logToLogMessage :: forall c (m :: Type -> Type). MonadLsp c m => LogAction m (WithSeverity Text) #

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

defaultClientLogger :: forall c (m :: Type -> Type). 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`.