Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a73da278
"vscode:/vscode.git/clone" did not exist on "d9a4fd0f3224411dac217e8b879fcf1bf47b42e9"
Commit
a73da278
authored
Jun 04, 2013
by
antirez
Browse files
Binary safe dump of object content in redisLogObjectDebugInfo().
parent
feffd563
Changes
1
Show whitespace changes
Inline
Side-by-side
src/debug.c
View file @
a73da278
...
@@ -387,9 +387,12 @@ void redisLogObjectDebugInfo(robj *o) {
...
@@ -387,9 +387,12 @@ void redisLogObjectDebugInfo(robj *o) {
redisLog
(
REDIS_WARNING
,
"Object encoding: %d"
,
o
->
encoding
);
redisLog
(
REDIS_WARNING
,
"Object encoding: %d"
,
o
->
encoding
);
redisLog
(
REDIS_WARNING
,
"Object refcount: %d"
,
o
->
refcount
);
redisLog
(
REDIS_WARNING
,
"Object refcount: %d"
,
o
->
refcount
);
if
(
o
->
type
==
REDIS_STRING
&&
o
->
encoding
==
REDIS_ENCODING_RAW
)
{
if
(
o
->
type
==
REDIS_STRING
&&
o
->
encoding
==
REDIS_ENCODING_RAW
)
{
redisLog
(
REDIS_WARNING
,
"Object raw string len: %d"
,
sdslen
(
o
->
ptr
));
redisLog
(
REDIS_WARNING
,
"Object raw string len: %zu"
,
sdslen
(
o
->
ptr
));
if
(
sdslen
(
o
->
ptr
)
<
4096
)
if
(
sdslen
(
o
->
ptr
)
<
4096
)
{
redisLog
(
REDIS_WARNING
,
"Object raw string content:
\"
%s
\"
"
,
(
char
*
)
o
->
ptr
);
sds
repr
=
sdscatrepr
(
sdsempty
(),
o
->
ptr
,
sdslen
(
o
->
ptr
));
redisLog
(
REDIS_WARNING
,
"Object raw string content: %s"
,
repr
);
sdsfree
(
repr
);
}
}
else
if
(
o
->
type
==
REDIS_LIST
)
{
}
else
if
(
o
->
type
==
REDIS_LIST
)
{
redisLog
(
REDIS_WARNING
,
"List length: %d"
,
(
int
)
listTypeLength
(
o
));
redisLog
(
REDIS_WARNING
,
"List length: %d"
,
(
int
)
listTypeLength
(
o
));
}
else
if
(
o
->
type
==
REDIS_SET
)
{
}
else
if
(
o
->
type
==
REDIS_SET
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment