feat: add logger (#64)

* refactor(health): keep in mind new way of health check (#63)

* feat(log): add logger module

* refactor(utils): remove unused code

* refactor(log, utils): get plugin name from config

* refactor(logger): add some type annotations

* refactor(utils): log notifications

* feat: LOGGER™

* feat(config): TYPES

* refactor(log): dont give a thing about var that is not even declared

* feat(log): add easy way to open log

* refactor(log): some types

* update types

* docs: regen

* fix(log): make setting log level by config work

* feat(iferr): write error to log file if occur

* feat(gotests): add logger
This commit is contained in:
Smirnov Oleksandr 2024-06-15 12:18:26 +03:00 committed by GitHub
parent 65fa148661
commit fbf6441f3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 213 additions and 31 deletions

View file

@ -43,6 +43,7 @@ local c = require "gopher.config"
local ts_utils = require "gopher._utils.ts"
local r = require "gopher._utils.runner"
local u = require "gopher._utils"
local log = require "gopher._utils.log"
local gotests = {}
---@param args table
@ -65,6 +66,8 @@ local function add_test(args)
table.insert(args, "-w")
table.insert(args, vim.fn.expand "%")
log.debug("generating tests with args: ", args)
return r.sync(c.commands.gotests, {
args = args,
on_exit = function(data, status)