Using openshift rhc tail command

前端 未结 5 1595
一向
一向 2021-02-08 16:54

How do you tail openshift log files? I issued the following command:

rhc tail myapp

It seems to show first error line and then stops, but doesn

相关标签:
5条回答
  • 2021-02-08 17:37

    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.

    0 讨论(0)
  • 2021-02-08 17:42

    you can see by running:

    rhc tail -a yourappname -l youremail -p yourpassword
    
    0 讨论(0)
  • 2021-02-08 17:45

    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

    0 讨论(0)
  • 2021-02-08 17:51

    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

    0 讨论(0)
  • 2021-02-08 17:54

    Adding -a option fix this issue for me.

    rhc tail -a {app_name}
    
    0 讨论(0)
提交回复
热议问题