(ctx context.Context, container string, end bool, line string, collectEntryPointErrorFn collectEntryPointErrorFunc)
| 789 | } |
| 790 | |
| 791 | func 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 | |
| 821 | func handleFileSystemEventForStamp(event fsnotify.Event, initializedStamp string) bool { |
| 822 | eventOpString := event.Op.String() |
no test coverage detected
searching dependent graphs…