Document that logger now encodes table arguments in JSON
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/tarantool/issues/8611
Product: Tarantool
Since: 3.4
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/log/#overview
SME: @ locker
Details
Scope:
- Add info and examples to:
How it used to work:
tarantool> require('log').info('%s', {foo = 'bar'})
table: 0x41f9d2e8
How it works now:
tarantool> require('log').info('%s', {foo = 'bar'})
{"foo":"bar"}
Note, JSON encoding is enabled only for tables that don't have
the __tostring meta-method:
tarantool> require('log').info('%s', setmetatable({foo = 'bar'}, {__tostring = function() return 'foobar' end}))
foobar
Requested by @ locker in https://github.com/tarantool/tarantool/commit/3db73c65f29a7d1991f7a94e5b488cd7c142bba1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the root log reference and the three named anchors for log.error, log.warn, and log.info. Add the documented table-argument JSON behavior, the existing examples, and the __tostring exception; done means all three sections describe the output shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100