Skip to content
Snippets Groups Projects
Commit 487555e0 authored by Ilya's avatar Ilya Committed by Roman Tsisyk
Browse files

log: don't ignore message field

Remove `message` field from blacklist, because JSON and plain
loggers are mutually exclusive.

Fixes #2923
parent 4e960f7f
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@ local json = require("json")
local special_fields = {
"file",
"level",
"message",
"pid",
"line",
"cord_name",
......
#!/usr/bin/env tarantool
local test = require('tap').test('log')
test:plan(19)
test:plan(20)
--
-- Check that Tarantool creates ADMIN session for #! script
......@@ -34,12 +34,17 @@ test:is(file:read():match('I>%s+(.*)'), "gh-2340: %s %D", "formatting without ar
log.info({key="value"})
test:is(file:read():match('I>%s+(.*)'), '{"key":"value"}', "table is handled as json")
--
--gh-2923 dropping message field
--
log.info({message="value"})
test:is(file:read():match('I>%s+(.*)'), '{"message":"value"}', "table is handled as json")
function help() log.info("gh-2340: %s %s", 'help') end
xpcall(help, function(err)
test:ok(err:match("bad argument #3"), "found error string")
test:ok(err:match("logger.test.lua:38:"), "found error place")
test:ok(err:match("logger.test.lua:"), "found error place")
end)
file:close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment