Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Write To A Log File From A Neovim Lua Plugin

This is the function I'm using while working on Neovim plugins.

lua
local log_to_file = function(message, path)
    local log_file_path = path 
    local log_file = io.open(log_file_path, "a")
    io.output(log_file)
    io.write(message.."\n")
    io.close(log_file)
end