From f26176220100f5b0a8b167b7377f78fc8ce95bcc Mon Sep 17 00:00:00 2001 From: Dmytro Zghoba Date: Mon, 18 Sep 2023 10:16:46 +0300 Subject: [PATCH] [PBM-1179] make warning --- agent/agent.go | 5 ++++- cli/cli.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 0a68cb7bc..0582e91e1 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -72,8 +72,11 @@ func (a *Agent) CanStart() error { if err != nil { return errors.WithMessage(err, "get mongo version") } + if err := pbm.FeatureSupport(ver).PBMSupport(); err != nil { + a.log.Warning("", "", "", primitive.Timestamp{}, "WARNING: %v", err) + } - return pbm.FeatureSupport(ver).PBMSupport() + return nil } // Start starts listening the commands stream. diff --git a/cli/cli.go b/cli/cli.go index 8b1fe760a..b36480c1d 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -359,7 +359,7 @@ func Main() { stdlog.Fatalf("get mongo version: %v", err) } if err := pbm.FeatureSupport(ver).PBMSupport(); err != nil { - stdlog.Fatal(err.Error()) + fmt.Fprintf(os.Stderr, "WARNING: %v\n", err) } }