Issue #28335: made minor improvement to implementation.
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 65d70da..917178e 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -559,7 +559,7 @@
                         handler.name = name
                         handlers[name] = handler
                     except Exception as e:
-                        if 'Unable to set target handler' in str(e):
+                        if 'target not configured yet' in str(e.__cause__):
                             deferred.append(name)
                         else:
                             raise ValueError('Unable to configure handler '