1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

awslogs: use github.com/pkg/errors to wrap an error

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2017-03-28 17:10:26 -07:00 committed by Justin Menga
parent 6f073e3522
commit f775005a17

View file

@ -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
}