[PATCH] allow printing of string buffers in hex format

Daniel Black daniel.black at openquery.com
Mon Oct 1 05:18:04 UTC 2012

While doing some other development I found it useful to print log messages in hex format.

The attached patch allows output of a string buffer in hex format using the format %X*s.

An example is:
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, log, 0, "Buffer in hex is %X*s", sizeof(buffer), buffer);

The existing %*s format still works.

Daniel Black
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-print_buffer_in_hex.patch
Type: text/x-patch
Size: 4186 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20121001/da58c2cc/attachment-0001.bin>

More information about the nginx-devel mailing list