Replace deprecated @vararg
This commit is contained in:
@@ -6,7 +6,7 @@ local M = {
|
|||||||
--- Write to log file
|
--- Write to log file
|
||||||
--- @param typ string as per log.types config
|
--- @param typ string as per log.types config
|
||||||
--- @param fmt string for string.format
|
--- @param fmt string for string.format
|
||||||
--- @vararg any arguments for string.format
|
--- @param ... any arguments for string.format
|
||||||
function M.raw(typ, fmt, ...)
|
function M.raw(typ, fmt, ...)
|
||||||
if not M.enabled(typ) then
|
if not M.enabled(typ) then
|
||||||
return
|
return
|
||||||
@@ -28,7 +28,7 @@ end
|
|||||||
--- Write profile start to log file
|
--- Write profile start to log file
|
||||||
--- START is prefixed
|
--- START is prefixed
|
||||||
--- @param fmt string for string.format
|
--- @param fmt string for string.format
|
||||||
--- @vararg any arguments for string.format
|
--- @param ... any arguments for string.format
|
||||||
--- @return Profile to pass to profile_end
|
--- @return Profile to pass to profile_end
|
||||||
function M.profile_start(fmt, ...)
|
function M.profile_start(fmt, ...)
|
||||||
local profile = {}
|
local profile = {}
|
||||||
@@ -54,7 +54,7 @@ end
|
|||||||
--- time and typ are prefixed and a trailing newline is added
|
--- time and typ are prefixed and a trailing newline is added
|
||||||
--- @param typ string as per log.types config
|
--- @param typ string as per log.types config
|
||||||
--- @param fmt string for string.format
|
--- @param fmt string for string.format
|
||||||
--- @vararg any arguments for string.format
|
--- @param ... any arguments for string.format
|
||||||
function M.line(typ, fmt, ...)
|
function M.line(typ, fmt, ...)
|
||||||
if M.enabled(typ) then
|
if M.enabled(typ) then
|
||||||
M.raw(typ, string.format("[%s] [%s] %s\n", os.date "%Y-%m-%d %H:%M:%S", typ, (fmt or "???")), ...)
|
M.raw(typ, string.format("[%s] [%s] %s\n", os.date "%Y-%m-%d %H:%M:%S", typ, (fmt or "???")), ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user