如何将Heroku日志保存到文本文件 [英] How to save Heroku logs to text file
问题描述
您可以试试这个:
> heroku日志-n number_of_lines --app application_name>> file_name
>>
运算符会将命令输出追加到一个文件: file_name
然而,heroku保留最后的1500行整合日志。如果您想要保留超过1,500行用于长期存储,搜索,警报,过滤和其他处理,您可以使用登录插件提供商。
I am having a problem with logs in Heroku. When I want to look at the logs, sometimes I have missed a few lines. How can I save Heroku server logs to file.txt, or any other file?
You can try this:
heroku logs -n number_of_lines --app application_name >> file_name
>>
operator will appends the command output to the end of a file : file_name
however, heroku keeps the last 1,500 lines of consolidated logs. If you’d like to persist more than 1,500 lines for long-term storage, search, alerting, filtering and other processing, you can use logging Add-on Providers.
这篇关于如何将Heroku日志保存到文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!