From a4d553cbb1a6f10495cb79518d8bd7fab939d900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Nagy?= Date: Sat, 15 Oct 2022 04:04:14 +0200 Subject: [PATCH] fix(logger): Fix bad argument #2 to strsplit (#125) Only Loki logging was affected. When no tags were given and the source is console the convertDDTagsToKVP break because of the nil value. --- imports/logger/server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imports/logger/server.lua b/imports/logger/server.lua index e388afe..936c2cc 100644 --- a/imports/logger/server.lua +++ b/imports/logger/server.lua @@ -143,7 +143,7 @@ if service == 'loki' then local values = {message = message} -- Format the args into strings - local tags = formatTags(source, ... and string.strjoin(',', string.tostringall(...)) or nil) + local tags = formatTags(source, ... and string.strjoin(',', string.tostringall(...)) or {}) local tagsTable = convertDDTagsToKVP(tags) -- Concatenates tags kvp table to the values table