--- TODO 2001/12/22 22:25:34 1.51
+++ TODO 2002/01/03 11:54:25 1.52
@@ -184,6 +184,31 @@
Describe whether a channel continues passing data on downstream
if it somehow fails, and if the data will be corrupt.
+- l2_util_fmt_string
+ This can be used like %s, but instead of fetching only a "char *"
+ from the var-args stack, it fetches a "char *" plus a "size_t" and
+ this way allows one to log only a sub-string of a larger string
+ without the need for any temporary buffers, etc.
+
+- l2_util_fmt_dump:
+ This can be used as "%{type}X" for dumping arbitrary octets. The
+ parameter "type" can be either "text" (the default if only "%X"
+ is used) for dumping the octets as text but with non-printable
+ characters replaced by "\xXX" constructs; "hex" for dumping the
+ octets in hexadecimal as "XX:XX:XX:XX" or "base64" for dumping the
+ octets Base64 encoded. All three are intended for making it easier to
+ produce reasonable L2_LEVEL_DEBUG messages without having to fiddle
+ around with temporary buffers and having to care with non-printable
+ characters.
+
+- formatter example
+ l2_stream_formatter(st, 'D', l2_util_fmt_dump, NULL);
+ :
+ l2_stream_vlog(st, L2_LEVEL_DEBUG, "%{text}D %{hex}D %{base64}D\n",
+ "foo", 12345, "foo\1bar", 7, "foo\1bar", 7, "foo\1bar", 7);
+ :
+ ...produces "foo\x01bar 66:6f:6f:01:62:61:72 Zm9vAWJhcg=="
+
High-level configuration interface
==================================
Config-File (OSSP):
|