ECS容器内的日志文件到Cloudwatch

时间:2018-08-28 07:20:23

标签: amazon-cloudwatch amazon-ecs amazon-cloudwatchlogs

使用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

[...]

0 个答案:

没有答案