fix(logger): remove config
This commit is contained in:
parent
d7f5112841
commit
beda8a3a03
2 changed files with 1 additions and 8 deletions
|
|
@ -15,7 +15,6 @@ end
|
||||||
|
|
||||||
local user_config = {}
|
local user_config = {}
|
||||||
local config = config_module.setup(user_config)
|
local config = config_module.setup(user_config)
|
||||||
logger.set_config(config)
|
|
||||||
local snippets_initialized = false
|
local snippets_initialized = false
|
||||||
|
|
||||||
local current_diff_layout = nil
|
local current_diff_layout = nil
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,8 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local config = nil
|
|
||||||
|
|
||||||
function M.set_config(user_config)
|
|
||||||
config = user_config
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.log(msg, level, override)
|
function M.log(msg, level, override)
|
||||||
level = level or vim.log.levels.INFO
|
level = level or vim.log.levels.INFO
|
||||||
if not config or config.debug or level >= vim.log.levels.WARN or override then
|
if level >= vim.log.levels.WARN or override then
|
||||||
vim.notify(('[cp.nvim]: %s'):format(msg), level)
|
vim.notify(('[cp.nvim]: %s'):format(msg), level)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue