MCPcopy
hub / github.com/cloudfoundry/cli / getLogs

Method getLogs

command/v7/push_command.go:762–783  ·  view source on GitHub ↗
(logStream <-chan sharedaction.LogMessage, errStream <-chan error)

Source from the content-addressed store, hash-verified

760}
761
762func (cmd PushCommand) getLogs(logStream <-chan sharedaction.LogMessage, errStream <-chan error) {
763 for {
764 select {
765 case logMessage, open := <-logStream:
766 if !open {
767 return
768 }
769 if logMessage.Staging() {
770 cmd.UI.DisplayLogMessage(logMessage, false)
771 }
772 case err, open := <-errStream:
773 if !open {
774 return
775 }
776 _, ok := err.(actionerror.LogCacheTimeoutError)
777 if ok {
778 cmd.UI.DisplayWarning("timeout connecting to log server, no log will be shown")
779 }
780 cmd.UI.DisplayWarning("Failed to retrieve logs from Log Cache: " + err.Error())
781 }
782 }
783}
784
785func (cmd PushCommand) showManifestDiff(spaceGUID string, transformedRawFinalManifest []byte) error {
786 diff, warnings, err := cmd.Actor.DiffSpaceManifest(spaceGUID, transformedRawFinalManifest)

Callers 1

processEventMethod · 0.95

Calls 4

StagingMethod · 0.80
DisplayLogMessageMethod · 0.65
DisplayWarningMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected