|
|
@@ -14,6 +14,7 @@ import javax.annotation.Nullable; |
|
|
|
import javax.ws.rs.*; |
|
|
|
import javax.ws.rs.core.Context; |
|
|
|
import javax.ws.rs.core.Response; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
@@ -36,7 +37,10 @@ public class LogsResource { |
|
|
|
|
|
|
|
@GET @Path(EP_STATUS) |
|
|
|
@NonNull public Response getLoggingStatus(@NonNull @Context final ContainerRequest ctx) { |
|
|
|
return ok(selfNodeService.getLogFlag()); |
|
|
|
final var flag = new HashMap<String, Object>(2); |
|
|
|
flag.put("flag", selfNodeService.getLogFlag()); |
|
|
|
flag.put("expireAt", selfNodeService.getLogFlagExpirationTime().orElse(null)); |
|
|
|
return ok(flag); |
|
|
|
} |
|
|
|
|
|
|
|
@POST @Path(EP_START) |
|
|
|