diff --git a/runtime/default.go b/runtime/default.go index e5abb8e1..c96963a4 100644 --- a/runtime/default.go +++ b/runtime/default.go @@ -342,7 +342,7 @@ func (r *runtime) Logs(s *Service, options ...LogsOption) (LogStream, error) { if ex, err := exists(fpath); err != nil { return nil, err } else if !ex { - return nil, fmt.Errorf("Log file %v does not exists", fpath) + return nil, fmt.Errorf("Logs not found for service %s", s.Name) } // have to check file size to avoid too big of a seek diff --git a/runtime/service.go b/runtime/service.go index 7098e240..4b07d6e9 100644 --- a/runtime/service.go +++ b/runtime/service.go @@ -229,7 +229,7 @@ func (s *service) Wait() { if s.PID.ID != thisPID.ID { // trying to update when it's already been switched out, ignore - logger.Warnf("Trying to update a process status but PID doesn't match. Old %s, New %s. Skipping update.", thisPID.ID, s.PID.ID) + logger.Debugf("Trying to update a process status but PID doesn't match. Old %s, New %s. Skipping update.", thisPID.ID, s.PID.ID) return } diff --git a/runtime/service/service.go b/runtime/service/service.go index 90451028..8dc5dc41 100644 --- a/runtime/service/service.go +++ b/runtime/service/service.go @@ -2,6 +2,7 @@ package service import ( "context" + "io" "sync" "github.com/micro/go-micro/v2/client" @@ -121,6 +122,9 @@ func (s *svc) Logs(service *runtime.Service, opts ...runtime.LogsOption) (runtim record := pb.LogRecord{} err := ls.RecvMsg(&record) if err != nil { + if err != io.EOF { + logStream.err = err + } logStream.Stop() return }