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

Function _serverAssertPrintClientInfo

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

Source from the content-addressed store, hash-verified

913}
914
915void _serverAssertPrintClientInfo(const client *c) {
916 int j;
917 char conninfo[CONN_INFO_LEN];
918
919 bugReportStart();
920 serverLog(LL_WARNING,"=== ASSERTION FAILED CLIENT CONTEXT ===");
921 serverLog(LL_WARNING,"client->flags = %llu", (unsigned long long) c->flags);
922 serverLog(LL_WARNING,"client->conn = %s", connGetInfo(c->conn, conninfo, sizeof(conninfo)));
923 serverLog(LL_WARNING,"client->argc = %d", c->argc);
924 for (j=0; j < c->argc; j++) {
925 char buf[128];
926 char *arg;
927
928 if (c->argv[j]->type == OBJ_STRING && sdsEncodedObject(c->argv[j])) {
929 arg = (char*) c->argv[j]->ptr;
930 } else {
931 snprintf(buf,sizeof(buf),"Object type: %u, encoding: %u",
932 c->argv[j]->type, c->argv[j]->encoding);
933 arg = buf;
934 }
935 serverLog(LL_WARNING,"client->argv[%d] = \"%s\" (refcount: %d)",
936 j, arg, c->argv[j]->refcount);
937 }
938}
939
940void serverLogObjectDebugInfo(const robj *o) {
941 serverLog(LL_WARNING,"Object type: %d", o->type);

Callers 1

_serverAssertWithInfoFunction · 0.85

Calls 3

bugReportStartFunction · 0.85
connGetInfoFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected