Skip to content

Commit 68146ba

Browse files
committed
changed printStackTrace to logging errors
1 parent e45ecd4 commit 68146ba

File tree

1 file changed

+6
-4
lines changed
  • gsrs-spring-legacy-indexer/src/main/java/ix/core/search

1 file changed

+6
-4
lines changed

gsrs-spring-legacy-indexer/src/main/java/ix/core/search/LazyList.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package ix.core.search;
22

33

4+
import lombok.extern.slf4j.Slf4j;
5+
46
import java.util.*;
57
import java.util.concurrent.Callable;
68

@@ -19,6 +21,7 @@
1921
* @param <N> The type of the name to be used
2022
* @param <T> The type of the object returned (the things "stored" in the list)
2123
*/
24+
@Slf4j
2225
public class LazyList<N,T> implements List<T>{
2326
private ObjectNamer<T,N> objectNamer;
2427

@@ -154,12 +157,11 @@ public T get(int index) {
154157
try {
155158
return nc.call();
156159
} catch (Exception e) {
157-
System.err.println("Named callable with name:" + nc.getName().toString() + " could not be fetched");
158-
e.printStackTrace();
160+
log.error("Named callable with name:" + nc.getName().toString() + " could not be fetched", e);
161+
159162
}
160163
}catch(Exception e){
161-
e.printStackTrace();
162-
System.err.println("Couldn't fetch Named Callable from list");
164+
log.error("Couldn't fetch Named Callable from list", e);
163165
}
164166
return null;
165167
}

0 commit comments

Comments
 (0)