logging - 将其他日志轮换到 Amazon S3

标签 logging amazon-web-services amazon-s3 amazon-elastic-beanstalk logrotate

我正在为我的 Symfony2.1 应用程序使用 Amazon Beanstalk(将 Linux AMI 与 Apache 结合使用)并且我激活了到 Amazon S3 的日志文件轮换。一切正常,但我想知道是否有任何方法可以将其他日志(位于其他位置)添加到轮换系统!

提前致谢!

最佳答案

你可以这样做。

files:
  "/opt/elasticbeanstalk/tasks/systemtaillogs.d/webapp.conf":
    mode: "000755"
    owner: root
    group: root
    content: |
      /var/app/support/logs/*.log
      /var/log/httpd/error_log
      /var/log/httpd/access_log
      /var/log/messages
      /var/app/current/code-igniter/application/logs/*log

  "/opt/elasticbeanstalk/tasks/publishlogs.d/webapp.conf":
    mode: "000755"
    owner: root
    group: root
    content: |
      /var/app/support/logs/*.log.*
      /var/app/support/logs/*.gz
      /var/log/httpd/*.gz
      /var/app/current/code-igniter/application/logs/*log

关于logging - 将其他日志轮换到 Amazon S3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16987481/

相关文章:

python-3.x - Cloudformation 的 AWS lambda 代码部署问题

amazon-web-services - 将 ENI 主干附加到 cloudform 中的自定义安全组

ruby-on-rails - Rails 部署到 Amazon EC2 - 设备上没有剩余空间

mysql - 从 Amazon S3 存储桶文件创建/更新 Amazon Athena 表

android - 部署后写入日志的 Android 最佳方法是什么?

python-3.x - 从 python 脚本登录到 rsyslog 工具

c++ - 如何获取所有函数参数值列表并将它们链接到 Visual C++ 中的日志记录类?

android - 通过 aws 服务更新 android 设备(或事物)应用程序代码

python - 使用Python将文件上传到S3

linux - 在使用文件时截断文件 (Linux)