From: Joel Rosdahl Date: Thu, 7 Jul 2022 10:32:26 +0000 (+0200) Subject: chore: Improve Redis log and exception message X-Git-Tag: v4.7~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a4256338358c5853c1ef0f277c4884b4b7fbede;p=thirdparty%2Fccache.git chore: Improve Redis log and exception message --- diff --git a/src/storage/secondary/RedisStorage.cpp b/src/storage/secondary/RedisStorage.cpp index 4c98634e3..68bac59e4 100644 --- a/src/storage/secondary/RedisStorage.cpp +++ b/src/storage/secondary/RedisStorage.cpp @@ -114,10 +114,11 @@ RedisStorageBackend::RedisStorageBackend(const Params& params) ASSERT(url.scheme() == "redis" || url.scheme() == "redis+unix"); if (url.scheme() == "redis+unix" && !params.url.host().empty() && params.url.host() != "localhost") { - throw core::Fatal(FMT( - "invalid file path \"{}\": specifying a host (\"{}\") is not supported", - params.url.str(), - params.url.host())); + throw core::Fatal( + FMT("invalid file path \"{}\": specifying a host other than localhost is" + " not supported", + params.url.str(), + params.url.host())); } auto connect_timeout = k_default_connect_timeout; @@ -229,7 +230,7 @@ RedisStorageBackend::connect(const Url& url, const uint32_t operation_timeout) { if (url.scheme() == "redis+unix") { - LOG("Redis connecting to unix://{} (connect timeout {} ms)", + LOG("Redis connecting to {} (connect timeout {} ms)", url.path(), connect_timeout); m_context.reset(redisConnectUnixWithTimeout(url.path().c_str(),