Good day!
I’ve been testing nakama for a month or so. I’ve already created custom logic for server authoritative match on Lua and tried a few other API calls.
Nakama and Lua are really nice, but I’d like to tune up lua part a bit. First of all, I’d like to see newline every time, when I call with “\n”
nk.logger_info("One line\nSome other line\n...")
The other place, where it’d be good to have this one, is on printing stacktrace:
{"level":"error","ts":"2022-02-03T22:13:39.731+0100","caller":"server/runtime_lua.go:1889","msg":"Could not complete runtime invocation","error":"/nakama/data/modules/birds.lua:8: attempt to index a non-table object(nil) with key 'leaderboard_create'\nstack traceback:\n\t/nakama/data/modules/birds.lua:8: in main chunk\n\t[G]: ?"}
Yeap, I see, that this is one line, containing timestamp, caller and so on, enclosed in curly bracers. In case of traceback, I’d probably put “error” string out of curly bracers and added one tab before every line in error string. Note, tabs make it prettier, but they are not the main target in the feature. The main target is to have new lines.
Thanks!