Print to stderr instead of normal echo if log message is of type error
This commit is contained in:
@ -43,12 +43,16 @@ function logger:log(op, message)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not self.silent and colors[op] then
|
if not self.silent and colors[op] then
|
||||||
|
if op == "error" then
|
||||||
|
vim.api.nvim_err_writeln(string.format("[dep] %s", message))
|
||||||
|
else
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "[dep]", "Identifier" },
|
{ "[dep]", "Identifier" },
|
||||||
{ " " },
|
{ " " },
|
||||||
{ message, colors[op] },
|
{ message, colors[op] },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if self.pipe then
|
if self.pipe then
|
||||||
self.pipe:write(string.format("[%s] %s: %s\n", os.date(), source, message))
|
self.pipe:write(string.format("[%s] %s: %s\n", os.date(), source, message))
|
||||||
|
Reference in New Issue
Block a user