Don't show the ASCII logo if syslog is enabled.

Closes issue #1935.
This commit is contained in:
antirez 2014-12-03 10:50:47 +01:00
parent b8a48ad5fe
commit eca9fbdb50

View File

@ -3404,15 +3404,27 @@ void redisAsciiArt(void) {
else if (server.sentinel_mode) mode = "sentinel"; else if (server.sentinel_mode) mode = "sentinel";
else mode = "standalone"; else mode = "standalone";
snprintf(buf,1024*16,ascii_logo, if (server.syslog_enabled) {
REDIS_VERSION, redisLog(REDIS_NOTICE,
redisGitSHA1(), "Redis %s (%s/%d) %s bit, %s mode, port %d, pid %ld ready to start.",
strtol(redisGitDirty(),NULL,10) > 0, REDIS_VERSION,
(sizeof(long) == 8) ? "64" : "32", redisGitSHA1(),
mode, server.port, strtol(redisGitDirty(),NULL,10) > 0,
(long) getpid() (sizeof(long) == 8) ? "64" : "32",
); mode, server.port,
redisLogRaw(REDIS_NOTICE|REDIS_LOG_RAW,buf); (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); zfree(buf);
} }