使用ECS运行docker容器,似乎只能将stdout,standerr等传输到AWS Cloudwatch,但是我不知道将容器内的日志文件传输到Cloudwatch的方法吗?
LogConfiguration:#配置日志记录驱动程序
LogDriver: awslogs # use logging driver awslogs to forward log messages to CloudWatch Logs
Options:
'awslogs-region': !Ref 'AWS::Region' # the AWS region
'awslogs-group': # the log group to send log messages to
'Fn::ImportValue': !Sub '${ParentClusterStack}-LogGroup'
'awslogs-stream-prefix': !Ref 'AWS::StackName' # a prefix for the log stream