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
4a30adde
Commit
4a30adde
authored
Jul 29, 2018
by
Oran Agra
Browse files
add DEBUG LOG, to to assist test suite debugging
parent
1a8d7cd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
4a30adde
...
@@ -290,6 +290,7 @@ void debugCommand(client *c) {
...
@@ -290,6 +290,7 @@ void debugCommand(client *c) {
"CRASH-AND-RECOVER <milliseconds> -- Hard crash and restart after <milliseconds> delay."
,
"CRASH-AND-RECOVER <milliseconds> -- Hard crash and restart after <milliseconds> delay."
,
"DIGEST -- Output a hex signature representing the current DB content."
,
"DIGEST -- Output a hex signature representing the current DB content."
,
"ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors."
,
"ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors."
,
"LOG <message> -- write message to the server log."
,
"HTSTATS <dbid> -- Return hash table statistics of the specified Redis database."
,
"HTSTATS <dbid> -- Return hash table statistics of the specified Redis database."
,
"HTSTATS-KEY <key> -- Like htstats but for the hash table stored as key's value."
,
"HTSTATS-KEY <key> -- Like htstats but for the hash table stored as key's value."
,
"LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory."
,
"LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory."
,
...
@@ -333,6 +334,9 @@ NULL
...
@@ -333,6 +334,9 @@ NULL
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"assert"
))
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"assert"
))
{
if
(
c
->
argc
>=
3
)
c
->
argv
[
2
]
=
tryObjectEncoding
(
c
->
argv
[
2
]);
if
(
c
->
argc
>=
3
)
c
->
argv
[
2
]
=
tryObjectEncoding
(
c
->
argv
[
2
]);
serverAssertWithInfo
(
c
,
c
->
argv
[
0
],
1
==
2
);
serverAssertWithInfo
(
c
,
c
->
argv
[
0
],
1
==
2
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"log"
)
&&
c
->
argc
==
3
)
{
serverLog
(
LL_WARNING
,
"DEBUG LOG: %s"
,
(
char
*
)
c
->
argv
[
2
]
->
ptr
);
addReply
(
c
,
shared
.
ok
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"reload"
))
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"reload"
))
{
rdbSaveInfo
rsi
,
*
rsiptr
;
rdbSaveInfo
rsi
,
*
rsiptr
;
rsiptr
=
rdbPopulateSaveInfo
(
&
rsi
);
rsiptr
=
rdbPopulateSaveInfo
(
&
rsi
);
...
...
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