]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Improve Redis log and exception message
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 7 Jul 2022 10:32:26 +0000 (12:32 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 7 Jul 2022 13:17:19 +0000 (15:17 +0200)
src/storage/secondary/RedisStorage.cpp

index 4c98634e3c5e7549817581677ea2dd0a2a7165dd..68bac59e43bfa61c97f32ab38875e5360cb5814a 100644 (file)
@@ -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(),