MINOR: tools: add append_prefixed_str()
This is somewhat related to indent_msg() except that this one places a
known prefix at the beginning of each line, allows to replace the EOL
character, and not to insert a prefix on the first line if not desired.
It works with a normal output buffer/chunk so it doesn't need to allocate
anything nor to modify the input string. It is suitable for use in multi-
line backtraces.
(cherry picked from commit a2c9911ace8537e0a350daf8d981170a001b6c7a)
[wt: backported to improve troubleshooting when the watchdog fires]
Signed-off-by: Willy Tarreau <w@1wt.eu>
2 files changed