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
cf71b821
Commit
cf71b821
authored
Jun 04, 2013
by
antirez
Browse files
Binary safe dump of object content in redisLogObjectDebugInfo().
parent
b6a2878a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
cf71b821
...
@@ -390,8 +390,11 @@ void redisLogObjectDebugInfo(robj *o) {
...
@@ -390,8 +390,11 @@ void redisLogObjectDebugInfo(robj *o) {
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: %zu"
,
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