MCPcopy Create free account
hub / github.com/F-Stack/f-stack / serverLogHexDump

Function serverLogHexDump

app/redis-6.2.6/src/debug.c:1885–1905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1883/* ==================== Logging functions for debugging ===================== */
1884
1885void serverLogHexDump(int level, char *descr, void *value, size_t len) {
1886 char buf[65], *b;
1887 unsigned char *v = value;
1888 char charset[] = "0123456789abcdef";
1889
1890 serverLog(level,"%s (hexdump of %zu bytes):", descr, len);
1891 b = buf;
1892 while(len) {
1893 b[0] = charset[(*v)>>4];
1894 b[1] = charset[(*v)&0xf];
1895 b[2] = '\0';
1896 b += 2;
1897 len--;
1898 v++;
1899 if (b-buf == 64 || len == 0) {
1900 serverLogRaw(level|LL_RAW,buf);
1901 b = buf;
1902 }
1903 }
1904 serverLogRaw(level|LL_RAW,"\n");
1905}
1906
1907/* =========================== Software Watchdog ============================ */
1908#include <sys/time.h>

Callers 2

hashTypeConvertZiplistFunction · 0.85
dumpCodeAroundEIPFunction · 0.85

Calls 1

serverLogRawFunction · 0.85

Tested by

no test coverage detected