Viewing Logs With the TIBCO® Cloud - Command Line Interface

You can view logs for your apps using the TIBCO Cloud - Command Line Interface (CLI). Logs can be streamed in real-time, or you can select a time range to view historical logs.

To stream real-time logs:

  1. View logs with the tibcli monitor applog --stream command.

    For example, to stream the logs continually for myApp1:

     tibcli monitor applog --stream myApp1
    

    The last five minutes of app logs are displayed, and will continually update in real time. They are refreshed every five seconds.

  2. Press Ctrl-C to stop displaying logs.

In addition to real-time logs, you can also view historical logs from a specified range.

To view historical logs:

  1. View logs with the tibcli monitor applog command. By default, this displays the last hour of app logs. You can also use the --beginTime, --endTime, and --interval options to define a different time range of logs to display.

    For example, to view the last hour of app logs for myApp1:

     tibcli monitor applog myApp1
    

    To view the logs for myApp1 for the last twelve hours:

     tibcli monitor applog --interval 12h myApp1
    

    To view the logs for myApp1 from midnight, January 20th to midnight, January 30th:

     tibcli monitor applog --beginTime 2016-01-20 --endTime 2016-01-30 myApp1
    
  2. Logs can be downloaded by redirecting the shell output to a file. For example, to download the last hour of app logs for myApp1:

     tibcli monitor applog myApp1 > myApp1.log
    

For more information on time formats and options, see the TIBCO® Cloud - Command Line Interface Reference.