slow log configuration implemented

This commit is contained in:
antirez
2011-06-30 15:47:15 +02:00
parent 63d62eb786
commit 35a6044140
4 changed files with 42 additions and 1 deletions

View File

@ -54,6 +54,7 @@ void slowlogInit(void) {
* This function will make sure to trim the slow log accordingly to the
* configured max length. */
void slowlogPushEntryIfNeeded(robj **argv, int argc, long long duration) {
if (server.slowlog_log_slower_than < 0) return; /* Slowlog disabled */
if (duration > server.slowlog_log_slower_than)
listAddNodeHead(server.slowlog,slowlogCreateEntry(argv,argc,duration));