When pushing a Docker app, this is the only staging-related logs printed:
2021/04/06 16:13:44 [DEBUG] POST http://capi.cf-system.svc.cluster.local:9023/internal/v3/staging/65545898-befa-4078-9fa2-7c84693008cb/build_completed?start=false
This is not a lager log. Also, it would be nice to see when staging starts and ends, and when we invoke the Docker registry, as info logs. Something like this:
Ensure logs are correlated using lager session IDs. This requires using the logger.Session method and passing the logger through method calls. It will not work if the logger is stored in a struct.
Logger can be passed as an explicit method argument, or might also be passed as part of the context object that is already passed around (see the https://github.com/cloudfoundry/lager/tree/master/lagerctx package, and note in this story). With lagerctx, there is the risk of accidentally and unknowingly using the fallback discard logger if the original context is somehow lost while passing through methods. So explicitly passing both context and logger as separate method parameters throughout might be the safest option, giving compile-time guarantees of having logging correctly propagated.
When pushing a Docker app, this is the only staging-related logs printed:
This is not a
lager
log. Also, it would be nice to see when staging starts and ends, and when we invoke the Docker registry, asinfo
logs. Something like this:Dev Notes
Ensure logs are correlated using lager session IDs. This requires using the
logger.Session
method and passing the logger through method calls. It will not work if the logger is stored in a struct.Logger can be passed as an explicit method argument, or might also be passed as part of the context object that is already passed around (see the https://github.com/cloudfoundry/lager/tree/master/lagerctx package, and note in this story). With lagerctx, there is the risk of accidentally and unknowingly using the fallback discard logger if the original context is somehow lost while passing through methods. So explicitly passing both context and logger as separate method parameters throughout might be the safest option, giving compile-time guarantees of having logging correctly propagated.