diff --git a/src/config.c b/src/config.c index aedef4888..54494c8e1 100644 --- a/src/config.c +++ b/src/config.c @@ -1122,7 +1122,7 @@ void configSetCommand(client *c) { } config_set_numerical_field( "lua-time-limit",server.lua_time_limit,0,LONG_MAX) { } config_set_numerical_field( - "slowlog-log-slower-than",server.slowlog_log_slower_than,0,LLONG_MAX) { + "slowlog-log-slower-than",server.slowlog_log_slower_than,-1,LLONG_MAX) { } config_set_numerical_field( "slowlog-max-len",ll,0,LONG_MAX) { /* Cast to unsigned. */ diff --git a/src/latency.c b/src/latency.c index 87e926078..e8d2af306 100644 --- a/src/latency.c +++ b/src/latency.c @@ -294,7 +294,7 @@ sds createLatencyReport(void) { /* Potentially commands. */ if (!strcasecmp(event,"command")) { - if (server.slowlog_log_slower_than == 0) { + if (server.slowlog_log_slower_than < 0) { advise_slowlog_enabled = 1; advices++; } else if (server.slowlog_log_slower_than/1000 >