From eca9fbdb50ab828b2382a813ccb8497bb5dd33ec Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 3 Dec 2014 10:50:47 +0100 Subject: [PATCH] Don't show the ASCII logo if syslog is enabled. Closes issue #1935. --- src/redis.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/redis.c b/src/redis.c index db6aff38..7a280072 100644 --- a/src/redis.c +++ b/src/redis.c @@ -3404,15 +3404,27 @@ void redisAsciiArt(void) { else if (server.sentinel_mode) mode = "sentinel"; else mode = "standalone"; - snprintf(buf,1024*16,ascii_logo, - REDIS_VERSION, - redisGitSHA1(), - strtol(redisGitDirty(),NULL,10) > 0, - (sizeof(long) == 8) ? "64" : "32", - mode, server.port, - (long) getpid() - ); - redisLogRaw(REDIS_NOTICE|REDIS_LOG_RAW,buf); + if (server.syslog_enabled) { + redisLog(REDIS_NOTICE, + "Redis %s (%s/%d) %s bit, %s mode, port %d, pid %ld ready to start.", + REDIS_VERSION, + redisGitSHA1(), + strtol(redisGitDirty(),NULL,10) > 0, + (sizeof(long) == 8) ? "64" : "32", + mode, server.port, + (long) getpid() + ); + } else { + snprintf(buf,1024*16,ascii_logo, + REDIS_VERSION, + redisGitSHA1(), + strtol(redisGitDirty(),NULL,10) > 0, + (sizeof(long) == 8) ? "64" : "32", + mode, server.port, + (long) getpid() + ); + redisLogRaw(REDIS_NOTICE|REDIS_LOG_RAW,buf); + } zfree(buf); }