Feat: Improve Logging for Go Server (#68)
This MR adds an optional `debug` object to the configuration table to help users debug any connectivity issues with Gitlab. The table lets you log the requests and responses from the Go server.
This commit is contained in:
committed by
GitHub
parent
c8a0267ba6
commit
f853c2f940
@@ -12,16 +12,18 @@ M.start = function(callback)
|
||||
local parsed_port = nil
|
||||
local callback_called = false
|
||||
local command = state.settings.bin
|
||||
.. " "
|
||||
.. state.settings.project_id
|
||||
.. " "
|
||||
.. state.settings.gitlab_url
|
||||
.. " "
|
||||
.. port
|
||||
.. " "
|
||||
.. state.settings.auth_token
|
||||
.. " "
|
||||
.. state.settings.log_path
|
||||
.. " "
|
||||
.. state.settings.project_id
|
||||
.. " "
|
||||
.. state.settings.gitlab_url
|
||||
.. " "
|
||||
.. port
|
||||
.. " "
|
||||
.. state.settings.auth_token
|
||||
.. " "
|
||||
.. "'" .. vim.json.encode(state.settings.debug) .. "'"
|
||||
.. " "
|
||||
.. state.settings.log_path
|
||||
|
||||
local job_id = vim.fn.jobstart(command, {
|
||||
on_stdout = function(_, data)
|
||||
@@ -86,7 +88,7 @@ M.build = function(override)
|
||||
end
|
||||
|
||||
local cmd = u.is_windows() and "cd %s\\cmd && go build -o bin.exe && move bin.exe ..\\"
|
||||
or "cd %s/cmd && go build -o bin && mv bin ../bin"
|
||||
or "cd %s/cmd && go build -o bin && mv bin ../bin"
|
||||
|
||||
local command = string.format(cmd, state.settings.bin_path)
|
||||
local null = u.is_windows() and " >NUL" or " > /dev/null"
|
||||
|
||||
Reference in New Issue
Block a user