From 5b94e3cee2c4405e98c9c0e8769670723a1f4bae Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 26 Aug 2021 12:49:29 +0200 Subject: fix logging when plenary is not available (#1390) --- lua/lsp/null-ls/linters.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua/lsp/null-ls/linters.lua') diff --git a/lua/lsp/null-ls/linters.lua b/lua/lsp/null-ls/linters.lua index b449a4f2..70c59974 100644 --- a/lua/lsp/null-ls/linters.lua +++ b/lua/lsp/null-ls/linters.lua @@ -3,7 +3,7 @@ local linters_by_ft = {} local null_ls = require "null-ls" local services = require "lsp.null-ls.services" -local logger = require("core.log"):get_default() +local Log = require "core.log" local function list_names(linters, options) options = options or {} @@ -45,15 +45,15 @@ function M.list_configured(linter_configs) local linter = null_ls.builtins.diagnostics[lnt_config.exe] if not linter then - logger.error("Not a valid linter:", lnt_config.exe) + Log:error("Not a valid linter:", lnt_config.exe) errors[lnt_config.exe] = {} -- Add data here when necessary else local linter_cmd = services.find_command(linter._opts.command) if not linter_cmd then - logger.warn("Not found:", linter._opts.command) + Log:warn("Not found:", linter._opts.command) errors[lnt_config.exe] = {} -- Add data here when necessary else - logger.info("Using linter:", linter_cmd) + Log:info("Using linter:", linter_cmd) linters[lnt_config.exe] = linter.with { command = linter_cmd, extra_args = lnt_config.args } end end -- cgit v1.2.3