Skip to content

Commit eb54f27

Browse files
yhmoCplus-plus唐家明
authored
fix log message (milvus-io#1488) (milvus-io#1502)
Signed-off-by: 唐家明 <tangjiaming@kuaishou.com> Co-authored-by: Cplus-plus <57971497+Cplus-plus@users.noreply.github.com> Co-authored-by: 唐家明 <tangjiaming@kuaishou.com>
1 parent cd6b75c commit eb54f27

7 files changed

Lines changed: 12 additions & 7 deletions

File tree

sdk-core/src/main/java/io/milvus/client/MilvusClient.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@
4545

4646
import java.util.concurrent.TimeUnit;
4747

48+
import org.slf4j.Logger;
49+
import org.slf4j.LoggerFactory;
50+
4851
/**
4952
* The Milvus Client Interface
5053
*/
5154
public interface MilvusClient {
55+
56+
Logger logger = LoggerFactory.getLogger(MilvusClient.class);
57+
5258
/**
5359
* Timeout setting for rpc call.
5460
*
@@ -99,7 +105,7 @@ default void close() {
99105
try {
100106
close(TimeUnit.MINUTES.toSeconds(1));
101107
} catch (InterruptedException e) {
102-
System.out.println("Interrupted during shutdown Milvus client!");
108+
logger.error("Interrupted during shutdown Milvus client!");
103109
}
104110
}
105111

sdk-core/src/main/java/io/milvus/orm/iterator/SearchIterator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ private void setUpRangeParameters(List<QueryResultsWrapper.RowRecord> page) {
227227
tailBand = getDistance(lastHit);
228228
String msg = String.format("set up init parameter for searchIterator width:%s tail_band:%s", width, tailBand);
229229
logger.debug(msg);
230-
// System.out.println(msg);
231230
}
232231

233232
private void updateFilteredIds(SearchResultsWrapper searchResultsWrapper) {

sdk-core/src/main/java/io/milvus/v2/client/MilvusClientV2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ public void close() {
10441044
try {
10451045
close(TimeUnit.MINUTES.toSeconds(1));
10461046
} catch (InterruptedException e) {
1047-
System.out.println("Interrupted during shutdown Milvus client!");
1047+
logger.error("Interrupted during shutdown Milvus client!");
10481048
}
10491049
}
10501050

sdk-core/src/main/java/io/milvus/v2/service/collection/CollectionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ private void WaitForLoadCollection(MilvusServiceGrpc.MilvusServiceBlockingStub b
481481
Thread.sleep(500); // Sleep for 0.5 second. Adjust this value as needed.
482482
} catch (InterruptedException e) {
483483
Thread.currentThread().interrupt();
484-
System.out.println("Thread was interrupted, Failed to complete operation");
484+
logger.error("Thread was interrupted, Failed to complete operation");
485485
return; // or handle interruption appropriately
486486
}
487487
}

sdk-core/src/main/java/io/milvus/v2/service/index/IndexService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void WaitForIndexComplete(MilvusServiceGrpc.MilvusServiceBlockingStub bl
249249
Thread.sleep(500); // Sleep for 0.5 second. Adjust this value as needed.
250250
} catch (InterruptedException e) {
251251
Thread.currentThread().interrupt();
252-
System.out.println("Thread was interrupted, failed to complete operation");
252+
logger.error("Thread was interrupted, failed to complete operation");
253253
return; // or handle interruption appropriately
254254
}
255255
}

sdk-core/src/main/java/io/milvus/v2/service/partition/PartitionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private void WaitForLoadPartitions(MilvusServiceGrpc.MilvusServiceBlockingStub b
152152
Thread.sleep(500); // Sleep for 0.5 second. Adjust this value as needed.
153153
} catch (InterruptedException e) {
154154
Thread.currentThread().interrupt();
155-
System.out.println("Thread was interrupted, failed to complete operation");
155+
logger.error("Thread was interrupted, failed to complete operation");
156156
return; // or handle interruption appropriately
157157
}
158158
}

sdk-core/src/main/java/io/milvus/v2/service/vector/VectorService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public RunAnalyzerResp runAnalyzer(MilvusServiceGrpc.MilvusServiceBlockingStub b
372372
builder.addAllAnalyzerNames(analyzerNames);
373373

374374
String params = JsonUtils.toJson(request.getAnalyzerParams());
375-
System.out.println(params);
375+
logger.debug(params);
376376
RunAnalyzerRequest runRequest = builder.addAllPlaceholder(byteStrings)
377377
.setAnalyzerParams(params)
378378
.setWithDetail(request.getWithDetail())

0 commit comments

Comments
 (0)