vim.Log
Methods10
function Log.format_func(min_level: vim.log.levels, level: vim.log.levels, ...) -> nil | string
function Log.trace(...: any) -> nil | boolean
function Log.debug(...: any) -> nil | boolean
function Log.info(...: any) -> nil | boolean
function Log.warn(...: any) -> nil | boolean
function Log.error(...: any) -> nil | boolean
function Log.new(opts: vim.log.new.Opts) -> vim.Log
Creates a logger instance.
The logger writes formatted messages to a file, using a per-instance log level and formatting function.
function Log.set_level(log: vim.Log, level: vim.log.levels) -> nil
Sets the current log level.
Entries below this level are skipped.
function Log.get_level(log: vim.Log) -> vim.log.levels
Gets the current log level.
function Log.set_format_func(log: vim.Log, func: fun(min_level: vim.log.levels, level: vim.log.levels, ...) -> nil | string) -> nil
Sets the formatter used to produce log entries.
The formatter receives the logger's minimum level, the message level, and the values passed to the writer method. Return a string to write an entry, or nil to skip it.
Fields1
Log.levels : vim.log.levels