我扩展了/opt/elasticbeanstalk/tasks/publishlogs.d/
,将轮换后的日志发布到预先配置的elasticbeanstalk S3存储桶中。
但是,发布路径为:
/$app/resources/environments/logs/publish/$environment/$instance_id/_var_log_nginx_rotated_access.log1563904862.gz
示例:
/elasticbeanstalk-us-east-1-000000000000000/resources/environments/logs/publish/e-r00000000m/i-0ab9c7a000000000/_var_log_nginx_rotated_access.log1563904862.gz
我想将发布路径格式更改为:
/$app/logs/$environment/$year/$month/$day/$instance_id-_var_log_nginx_rotated_access.log1563904862.gz
我基本上希望能够按环境和日期而不是环境和实例ID来组织日志