18
18
import tech .ydb .core .StatusCode ;
19
19
import tech .ydb .core .grpc .GrpcStatuses ;
20
20
import tech .ydb .core .grpc .GrpcTransport ;
21
+ import tech .ydb .proto .auth .YdbAuth ;
21
22
22
23
/**
23
24
*
@@ -51,7 +52,11 @@ public CompletableFuture<Result<RespT>> startCall(ReqT request, Metadata headers
51
52
try {
52
53
call .start (this , headers );
53
54
if (logger .isTraceEnabled ()) {
54
- logger .trace ("UnaryCall[{}] --> {}" , traceId , TextFormat .shortDebugString ((Message ) request ));
55
+ if (request instanceof YdbAuth .LoginRequest ) {
56
+ logger .trace ("UnaryCall[{}] --> {}" , traceId , "LoginRequest user: XXXX password: XXXX" );
57
+ } else {
58
+ logger .trace ("UnaryCall[{}] --> {}" , traceId , TextFormat .shortDebugString ((Message ) request ));
59
+ }
55
60
}
56
61
call .sendMessage (request );
57
62
call .halfClose ();
@@ -71,7 +76,11 @@ public CompletableFuture<Result<RespT>> startCall(ReqT request, Metadata headers
71
76
@ Override
72
77
public void onMessage (RespT value ) {
73
78
if (logger .isTraceEnabled ()) {
74
- logger .trace ("UnaryCall[{}] <-- {}" , traceId , TextFormat .shortDebugString ((Message ) value ));
79
+ if (value instanceof YdbAuth .LoginResponse ) {
80
+ logger .trace ("UnaryCall[{}] <-- {}" , traceId , "LoginResponse XXXX" );
81
+ } else {
82
+ logger .trace ("UnaryCall[{}] <-- {}" , traceId , TextFormat .shortDebugString ((Message ) value ));
83
+ }
75
84
}
76
85
if (!this .value .compareAndSet (null , value )) {
77
86
future .complete (Result .fail (MULTIPLY_VALUES ));
0 commit comments