fix: new better logger

This commit is contained in:
əlemi 2024-08-06 23:03:46 +02:00
parent 21dbc36d01
commit 059dc68e3f
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -28,9 +28,10 @@ local native = require('codemp.loader').load() -- make sure we can load the nati
-- TODO nvim docs say that we should stop all threads before exiting nvim
-- but we like to live dangerously (:
vim.loop.new_thread({}, function()
vim.loop.sleep(500) -- sleep a bit leaving user config time to override logger opts
vim.loop.sleep(1000) -- allow user to setup their own logger options
local _codemp = require('codemp.loader').load()
local logger = _codemp.setup_tracing()
_codemp.setup_logger()
local logger = _codemp.get_logger()
while true do
print(logger:recv())
end