added some logs
This commit is contained in:
parent
fc8b551249
commit
b6e9fcddae
|
@ -65,8 +65,10 @@ public class GeoportalHealthCheck implements HealthCheck {
|
|||
buildHCRProvider.setStatus(Status.UP);
|
||||
MongoIterable<String> collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
|
||||
.listCollectionNames();
|
||||
log.info("listCollectionNames is null: {}", collections == null);
|
||||
int i = 1;
|
||||
for (String coll : collections) {
|
||||
log.info("adding collection: {}", coll);
|
||||
buildHCRProvider.withData("collection " + i, coll);
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.util.Optional;
|
|||
import org.eclipse.microprofile.health.HealthCheckResponse;
|
||||
import org.eclipse.microprofile.health.HealthCheckResponse.Status;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* The Class HealthCheckResponseGeoportalProvider.
|
||||
*
|
||||
|
@ -14,6 +16,7 @@ import org.eclipse.microprofile.health.HealthCheckResponse.Status;
|
|||
*
|
||||
* Oct 16, 2024
|
||||
*/
|
||||
@Slf4j
|
||||
public class HealthCheckResponseGeoportalProvider {
|
||||
|
||||
private String name;
|
||||
|
@ -108,6 +111,9 @@ public class HealthCheckResponseGeoportalProvider {
|
|||
public HealthCheckResponse buildHealthCheckResponse() {
|
||||
if (myMap != null)
|
||||
data = Optional.of(myMap);
|
||||
|
||||
log.info("data are: "+data);
|
||||
|
||||
return new HealthCheckResponse(name, status, data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue