From f775005a17c7ae0d3851cc86f46b7c46aafa27d8 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Tue, 28 Mar 2017 17:10:26 -0700 Subject: [PATCH] awslogs: use github.com/pkg/errors to wrap an error Signed-off-by: Tibor Vass --- daemon/logger/awslogs/cloudwatchlogs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/logger/awslogs/cloudwatchlogs.go b/daemon/logger/awslogs/cloudwatchlogs.go index ed62e53896..b942d55272 100644 --- a/daemon/logger/awslogs/cloudwatchlogs.go +++ b/daemon/logger/awslogs/cloudwatchlogs.go @@ -3,7 +3,6 @@ package awslogs import ( "bytes" - "errors" "fmt" "os" "regexp" @@ -25,6 +24,7 @@ import ( "github.com/docker/docker/daemon/logger/loggerutils" "github.com/docker/docker/dockerversion" "github.com/docker/docker/pkg/templates" + "github.com/pkg/errors" ) const ( @@ -109,7 +109,7 @@ func parseMultilineOptions(info logger.Info) (*regexp.Regexp, error) { if multilinePatternKey != "" { multilinePattern, err := regexp.Compile(multilinePatternKey) if err != nil { - return nil, err + return nil, errors.Wrapf(err, "awslogs could not parse multiline pattern key %q", multilinePatternKey) } return multilinePattern, nil }