MCPcopy
hub / github.com/containers/toolbox / handleEntryPointLog

Function handleEntryPointLog

src/cmd/run.go:791–819  ·  view source on GitHub ↗
(ctx context.Context,
	container string,
	end bool,
	line string,
	collectEntryPointErrorFn collectEntryPointErrorFunc)

Source from the content-addressed store, hash-verified

789}
790
791func handleEntryPointLog(ctx context.Context,
792 container string,
793 end bool,
794 line string,
795 collectEntryPointErrorFn collectEntryPointErrorFunc) error {
796 if end {
797 if cause := context.Cause(ctx); errors.Is(cause, context.Canceled) {
798 return cause
799 } else {
800 logrus.Debugf("Reading logs from container %s failed: 'podman logs' finished unexpectedly",
801 container)
802 return errors.New("'podman logs' finished unexpectedly")
803 }
804 } else {
805 if err := showEntryPointLog(line); err != nil {
806 var errEntryPoint *entryPointError
807
808 if errors.As(err, &errEntryPoint) {
809 collectEntryPointErrorFn(err)
810 return nil
811 }
812
813 logrus.Debugf("Parsing entry point log failed: %s:", err)
814 logrus.Debugf("%s", line)
815 }
816 }
817
818 return nil
819}
820
821func handleFileSystemEventForStamp(event fsnotify.Event, initializedStamp string) bool {
822 eventOpString := event.Op.String()

Callers 1

Calls 2

showEntryPointLogFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…