Home GnuPG

logging: Add a truncate keyword to log_printhex.

Description

logging: Add a truncate keyword to log_printhex.

* src/logging.c (_gpgrt_logv_printhex): Add keyword support.

A keyword in the format string is indicated by a leading pipe symbo,
and exlamation mark, an arbitrary string of keywords, and a fina pipe
sumbol. The only supprted keyword righty now is "trunc". Thus

gpgrt_log_printhex (buf, buflen, "|!trunc|The buffer:")

Will output not more that 32 hex bytes after "The buffer:" and instead
of wrapping indicate the truncation by an Unicode horizontal ellipsis
(#x2026).

Details

Provenance
wernerAuthored on Fri, Apr 12, 3:16 PM
Parents
rE2dc93cfecc7a: argparser: avoid endless loop due to a conf file read error.
Branches
Unknown
Tags
Unknown