Welcome! Log In Create A New Profile

Advanced

[PATCH] allow printing of string buffers in hex format

Daniel Black
October 01, 2012 01:20AM
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_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] allow printing of string buffers in hex format

Daniel Black 1142 October 01, 2012 01:20AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 200
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready