]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Add type specifiers support to lua_logger 5668/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 6 Oct 2025 13:22:26 +0000 (14:22 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 6 Oct 2025 13:22:26 +0000 (14:22 +0100)
commit177e8b470be1710d7cf0be520a0826e8338e6250
treec133e859b10143ac8ce69790a7e627f6a09d07cb
parent4e7545435b0a6e4ca2c45e04d58ac12e900545e6
[Feature] Add type specifiers support to lua_logger

Add support for format type specifiers in lua_logger:
- %d - signed integer (int64)
- %ud - unsigned integer (uint64)
- %f - floating point with smart formatting (no trailing zeros)
- %.Nf - floating point with N decimal places precision
- %% - escape literal percent sign

Type specifiers can be combined with positional (%1d) and
sequential (%d) argument references. String to number conversion
is supported. Added comprehensive unit tests.
src/lua/lua_logger.c
test/lua/unit/logger.lua