awslogs: use github.com/pkg/errors to wrap an error
Signed-off-by: Tibor Vass <tibor@docker.com> Upstream-commit: f775005a17c7ae0d3851cc86f46b7c46aafa27d8 Component: engine
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user