Using openshift rhc tail command

岁酱吖の 提交于 2019-12-03 06:27:38

The 'rhc tail' command reads the last few lines of each of your log files and continues to feed subsequent log messages to your console. To view the entire log file, please review:
https://www.openshift.com/faq/how-to-troubleshoot-application-issues-using-logs

you can see by running:

rhc tail -a yourappname -l youremail -p yourpassword

Adding -a option fix this issue for me.

rhc tail -a {app_name}

Openshift place logs in different files, so if you want get logs of a specific file then you can add -f file/address/and/name

Example :

rhc tail -f app-root/logs/nodejs.log -a myAppName

also you can ask for specific number of lines by adding -o "-n 40" in command. Above command will get last 40 lines.

Example :

rhc tail -f app-root/logs/nodejs.log -o "-n 40" -a myAppName

You can also download them:

$ scp  SHA@APP-DOMAIN.rhcloud.com:/var/lib/openshift/SHA/app-root/\
logs/APP.log "~/upstream.jbossas.log"

Feasible also in windows directly in git bash.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!