本文介绍了我无法在Elastic Beanstalk ec2实例上找到生产日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Rails应用程序部署到Elastic Beanstalk。我正在尝试查找前一天的生产日志文件。它们不存在于可从AWS EB控制台下载的压缩捆绑包中。它们在ec2实例的/ var / log目录中不存在。在/ var / app / support / logs中,只有今天的日志文件。

I have deployed a Rails app to Elastic Beanstalk. I am trying to locate the production log files from the previous day. They are not present in the zipped bundle which can be downloaded from the AWS EB console. They are not present in the /var/log directory of the ec2 instance. in /var/app/support/logs there are only todays log files.

还有其他地方可以查看吗?

Is there anywhere else to look?

我的EB环境配置不正确吗?如果是这样,我该如何解决该问题?

Is my EB environment configured incorrectly? If so, how do I correct the problem?

在此先感谢您提供任何提示或提示。

Thanks in advance for any hints or tips.

推荐答案

所有系统日志都应位于 / var / log 中,您可能会看到 .log.1 位于日志文件的末尾,这是因为它们已轮换。

All your system logs should be in /var/log you'll probably see .log.1 at the end of the log files, this is because they are rotated.

对于您的应用程序,我将查找: / var / app / support / logs ,在这里您可以找到乘客的日志(如果那是您的堆栈运行的日志)。您可能会在该目录中看到以下内容:

For your application, I'd look in: /var/app/support/logs, here you'll find logs for Passenger (if that's what your stack runs). You'll probably see something like this in that directory:

access.log
development.log
healthd/
passenger.log
production.log
rotated/

如果您使用的是NGINX和Puma堆栈(或其他最近更新的2018 eb堆栈),则您的应用将在以下位置运行: / var / app / current

If you are using the NGINX and Puma stack (or other newly updated 2018 eb stacks), your appwill be running at: /var/app/current

这篇关于我无法在Elastic Beanstalk ec2实例上找到生产日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 08:58