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

Return more context on awslogs create failure

Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
This commit is contained in:
Cody Roseborough 2018-09-28 11:23:01 -07:00
parent deac65c929
commit 7a5c813d9c

View file

@ -375,13 +375,17 @@ func (l *logStream) create() error {
if l.logCreateGroup {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == resourceNotFoundCode {
if err := l.createLogGroup(); err != nil {
return err
return errors.Wrap(err, "failed to create Cloudwatch log group")
}
return l.createLogStream()
err := l.createLogStream()
if err != nil {
return errors.Wrap(err, "failed to create Cloudwatch log stream")
}
return nil
}
}
if err != nil {
return err
return errors.Wrap(err, "failed to create Cloudwatch log stream")
}
}