diff options
author | Don Anderson <dda@ddanderson.com> | 2015-02-05 12:20:55 -0500 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2015-02-05 12:20:55 -0500 |
commit | 7cc7efb75c90e778f9757b954ad3ec85912b58fd (patch) | |
tree | 6fe8657edc24e503f4eb01792d8eae8b3f4ff808 /dist | |
parent | 36ce5e5461ef36df9cafeaa55c27e95a8d07e266 (diff) | |
download | mongo-7cc7efb75c90e778f9757b954ad3ec85912b58fd.tar.gz |
For wt printlog, make operations into a JSON array.
Without that, any tool that parses JSON is almost certain to merge
successive values of repeated fields.
Refs #1438.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/log.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dist/log.py b/dist/log.py index 9091754ba0b..57b8fdc0f23 100644 --- a/dist/log.py +++ b/dist/log.py @@ -260,7 +260,7 @@ __wt_logop_%(name)s_print( \t%(arg_init)sWT_RET(__wt_logop_%(name)s_unpack( \t session, pp, end%(arg_addrs)s)); -\tfprintf(out, " \\"optype\\": \\"%(name)s\\",\\n"); +\tfprintf(out, " \\"optype\\": \\"%(name)s\\",\\n"); \t%(print_args)s \t%(arg_fini)sreturn (0); } @@ -274,10 +274,10 @@ __wt_logop_%(name)s_print( if has_escape(optype.fields) else ''), 'arg_addrs' : ''.join(', &%s' % f[1] for f in optype.fields), 'print_args' : '\n\t'.join( - '%sfprintf(out, " \\"%s\\": \\"%s\\",\\n",%s);' % + '%sfprintf(out, " \\"%s\\": \\"%s\\",\\n",%s);' % (printf_setup(f), f[1], printf_fmt(f), printf_arg(f)) for f in optype.fields[:-1]) + str( - '\n\t%sfprintf(out, " \\"%s\\": \\"%s\\"",%s);' % + '\n\t%sfprintf(out, " \\"%s\\": \\"%s\\"",%s);' % (printf_setup(last_field), last_field[1], printf_fmt(last_field), printf_arg(last_field))), }) |