Skip to content

Commit

Permalink
fix(log): dont hardcode log level
Browse files Browse the repository at this point in the history
log level can be controlled via the environment variable DEBUG_PLENARY="debug"
  • Loading branch information
teto committed Dec 29, 2022
1 parent c5094a8 commit 867cde3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lua/rest-nvim/curl/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local utils = require("rest-nvim.utils")
local curl = require("plenary.curl")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local log = require("plenary.log").new({ plugin = "rest.nvim" })
local config = require("rest-nvim.config")

local M = {}
Expand Down
5 changes: 3 additions & 2 deletions lua/rest-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
local request = require("rest-nvim.request")
local config = require("rest-nvim.config")
local curl = require("rest-nvim.curl")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local log = require("plenary.log").new({ plugin = "rest.nvim" })

local rest = {}
local Opts = {}
local LastOpts = {}

rest.setup = function(user_configs)
config.set(user_configs or {})
local test = config.set(user_configs or {})
print(vim.inspect(test))

This comment has been minimized.

Copy link
@rochacbruno

rochacbruno Dec 29, 2022

Contributor

I am now seeing a popup with a log message every time I enter the editor.

How/Where do I set the log level now?

@teto

This comment has been minimized.

Copy link
@teto

teto Dec 29, 2022

Author Collaborator

fixed in #167 sry for that

end

-- run will retrieve the required request information from the current buffer
Expand Down
2 changes: 1 addition & 1 deletion lua/rest-nvim/request/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local utils = require("rest-nvim.utils")
local path = require("plenary.path")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local log = require("plenary.log").new({ plugin = "rest.nvim" })
local config = require("rest-nvim.config")

-- get_importfile returns in case of an imported file the absolute filename
Expand Down

0 comments on commit 867cde3

Please sign in to comment.