0

I'm pushing a manifest to CF with the cloudfoundry-operations library like this:

 final PushApplicationManifestRequest pushRequest = PushApplicationManifestRequest.builder()
    .manifest(applicationManifest)
    .build();

final Mono<Void> pushManifest = cfOperations.applications().pushManifest(pushRequest);

pushManifest.block(); // I want to block at this point

The issue I have is that this operation can take several minutes and I get no feedback in between, there's no output. I would like to see more output on what's going on (is it uploading, staging...)

Is there a simple way of seeing more log output? Like, are there some configuration parameters for the CF client I can adjust for this?

I could sieve through the code and adjust slf4j configuration to print more information, but feels fragile and complex.

Chirlo
  • 5,989
  • 1
  • 29
  • 45
  • What are you trying to see exactly? The staging output & app logs? or logs from what the library itself is doing? I think adjusting log levels is only going to get you that. You might just need to use `cloudfoundry-operations` to stream logs in a separate thread. – Daniel Mikusa Feb 07 '20 at 19:45
  • @Daniel, I'd like to have a feeling for what's going on, more inline with the cf cli. Like, now it's being pushed, now staging is beginning ...Right now I call push and 5 minutes later I can say I'm done , but get no feedback in between. – Chirlo Feb 07 '20 at 20:04
  • Well, you can try setting the log level for `cloudfoundry-client.operations` to DEBUG and see if that's helpful, i.e. `logging.level.cloudfoundry-client.operations=DEBUG`. It will give you some basics like when the push starts and finishes. The full details of what happens during staging, like buildpack output would need to come from the platform's log stream though. So you'd need essentially a separate flow that kicks off for the app after you push which pulls the logs for that application. – Daniel Mikusa Feb 10 '20 at 04:45

0 Answers0