Software /
code /
prosody
Comparison
util/format.lua @ 12984:f08125a8be34
util.format: Restore "freeze" serialization behavior in logging
This was implied with the "debug" preset and does nice things like turn
util.set objects into "set{a,b,c}" instead of the quite verbose thing
you get otherwise.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Mar 2023 00:33:20 +0100 |
parent | 12983:4533c9b906b0 |
comparison
equal
deleted
inserted
replaced
12983:4533c9b906b0 | 12984:f08125a8be34 |
---|---|
13 local dump = require"prosody.util.serialization".new({ | 13 local dump = require"prosody.util.serialization".new({ |
14 preset = "compact"; | 14 preset = "compact"; |
15 fallback = function(v, why) | 15 fallback = function(v, why) |
16 return "_[[" .. (why or tostring(v)) .. "]] "; | 16 return "_[[" .. (why or tostring(v)) .. "]] "; |
17 end; | 17 end; |
18 freeze = true; | |
18 fatal = false; | 19 fatal = false; |
19 maxdepth = 5; | 20 maxdepth = 5; |
20 }); | 21 }); |
21 local num_type = math.type; | 22 local num_type = math.type; |
22 | 23 |