mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 14:49:43 +02:00
fix(config/log): show error in config instead of hiding (#1751)
This commit is contained in:
parent
5deb0e57ce
commit
9e18c16b2b
2 changed files with 3 additions and 3 deletions
|
@ -152,10 +152,10 @@ end
|
|||
-- @param config_path The path to the configuration overrides
|
||||
function M:load(config_path)
|
||||
config_path = config_path or self.get_user_config_path()
|
||||
local ok, _ = pcall(dofile, config_path)
|
||||
local ok, err = pcall(dofile, config_path)
|
||||
if not ok then
|
||||
if utils.is_file(user_config_file) then
|
||||
Log:warn("Invalid configuration: " .. config_path)
|
||||
Log:warn("Invalid configuration: " .. err)
|
||||
else
|
||||
Log:warn(string.format("Unable to find configuration file [%s]", config_path))
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ function Log:add_entry(msg, level)
|
|||
end
|
||||
local status_ok, plenary = pcall(require, "plenary")
|
||||
if status_ok then
|
||||
local default_opts = { plugin = "lunarvim", level = lvim.log.level }
|
||||
local default_opts = { plugin = "lunarvim", level = lvim.log.level, info_level = 4 }
|
||||
local handle = plenary.log.new(default_opts)
|
||||
handle[level:lower()](msg)
|
||||
self.__handle = handle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue