@@ -110,7 +110,7 @@ public static void close(Context context) {
110110 try {
111111 context .close ();
112112 } catch (NamingException ex ) {
113- logger .error ("could not close context" , ex );
113+ logger .warn ("could not close context" , ex );
114114 }
115115 }
116116 }
@@ -125,7 +125,7 @@ public static void close(StartTlsResponse tls) {
125125 try {
126126 tls .close ();
127127 } catch (IOException ex ) {
128- logger .error ("could not close tls response" , ex );
128+ logger .warn ("could not close tls response" , ex );
129129 }
130130 }
131131 }
@@ -140,7 +140,7 @@ public static void close(NamingEnumeration<?> enm) {
140140 try {
141141 enm .close ();
142142 } catch (NamingException ex ) {
143- logger .error ("could not close enumeration" , ex );
143+ logger .warn ("could not close enumeration" , ex );
144144 }
145145 }
146146 }
@@ -168,7 +168,7 @@ public static String getAttribute(Attributes attributes, String name) {
168168 }
169169 }
170170 } catch (NamingException ex ) {
171- logger .warn ("could not fetch attribute " . concat ( name ) , ex );
171+ logger .warn ("could not fetch attribute '{}'" , name , ex );
172172 }
173173
174174 return value ;
@@ -227,10 +227,10 @@ public static int getSearchScope(String scopeString) {
227227 } else if (SCOPE_OBJECT .equalsIgnoreCase (scopeString )) {
228228 scope = SearchControls .OBJECT_SCOPE ;
229229 } else if (logger .isWarnEnabled ()) {
230- logger .warn ("unknown scope {}, using subtree scope" , scopeString );
230+ logger .info ("unknown scope {}, using subtree scope" , scopeString );
231231 }
232232 } else if (logger .isWarnEnabled ()) {
233- logger .warn ("no search scope defined, using subtree scope" );
233+ logger .info ("no search scope defined, using subtree scope" );
234234 }
235235
236236 return scope ;
0 commit comments