File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
spring-vault-core/src/main/java/org/springframework/vault/core/util Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2020import java .util .Map ;
2121import java .util .function .Supplier ;
2222
23+ import org .apache .commons .logging .Log ;
24+ import org .apache .commons .logging .LogFactory ;
25+
2326import org .springframework .lang .Nullable ;
2427import org .springframework .util .ConcurrentReferenceHashMap ;
2528import org .springframework .util .StringUtils ;
4043 */
4144public class KeyValueDelegate {
4245
46+ private static final Log logger = LogFactory .getLog (KeyValueDelegate .class );
47+
4348 private final Map <String , MountInfo > mountInfo ;
4449
4550 private final VaultOperations operations ;
@@ -125,13 +130,20 @@ public MountInfo getMountInfo(String path) {
125130
126131 if (mountInfo == null ) {
127132 try {
128-
129133 mountInfo = doGetMountInfo (path );
130134 }
131135 catch (VaultException e ) {
136+ if (logger .isDebugEnabled ()) {
137+ logger .debug ("Unable to determine mount information for [%s]. Returning unavailable MountInfo: %s"
138+ .formatted (path , e .getMessage ()), e );
139+ }
132140 return MountInfo .unavailable ();
133141 }
134142 catch (RuntimeException e ) {
143+ if (logger .isDebugEnabled ()) {
144+ logger .debug ("Unable to determine mount information for [%s]. Caching unavailable MountInfo: %s"
145+ .formatted (path , e .getMessage ()), e );
146+ }
135147 mountInfo = MountInfo .unavailable ();
136148 }
137149
You can’t perform that action at this time.
0 commit comments