22
33import lombok .NonNull ;
44import lombok .SneakyThrows ;
5+ import lombok .extern .slf4j .Slf4j ;
56import xyz .tcheeric .phoenixd .common .rest .Operation ;
67import xyz .tcheeric .phoenixd .common .rest .Request ;
78import xyz .tcheeric .phoenixd .common .rest .util .Constants ;
1112import java .net .http .HttpRequest ;
1213import java .net .http .HttpRequest .Builder ;
1314
15+ @ Slf4j
1416public class DeleteOperation extends AbstractOperation {
1517
1618 public DeleteOperation (HttpRequest httpRequest ) {
@@ -20,11 +22,13 @@ public DeleteOperation(HttpRequest httpRequest) {
2022 @ SneakyThrows
2123 public DeleteOperation (@ NonNull String path ) {
2224 super (Constants .HTTP_DELETE_METHOD , path , null );
25+ if (log .isDebugEnabled ()) log .debug ("Initialized DELETE operation for path={}" , path );
2326 }
2427
2528 @ SneakyThrows
2629 public DeleteOperation (@ NonNull String path , @ NonNull Request .Param requestParam ) {
2730 super (Constants .HTTP_DELETE_METHOD , path , requestParam , null );
31+ if (log .isDebugEnabled ()) log .debug ("Initialized DELETE operation for path={} with params" , path );
2832 }
2933
3034 @ Override
@@ -40,11 +44,12 @@ public Operation removeHeader(@NonNull String key) {
4044 });
4145
4246 this .httpRequest = requestBuilder .build ();
47+ if (log .isDebugEnabled ()) log .debug ("Removed header '{}' from DELETE request {} {}" , key , httpRequest .method (), httpRequest .uri ());
4348 return this ;
4449 }
4550
4651 @ Override
4752 public Operation addHeader (String key , String value ) {
4853 throw new UnsupportedOperationException ("Not supported yet." );
4954 }
50- }
55+ }
0 commit comments