Title: Runtime Logs with VIP-CLI
Author: WordPress VIP Documentation
Published: January 6, 2022
Last modified: February 3, 2026

---

 1. [Logs](https://docs.wpvip.com/logs/)
 2. [Runtime Logs ](https://docs.wpvip.com/logs/runtime-logs/)
 3. Runtime Logs with VIP-CLI

#  Runtime Logs with VIP-CLI

Runtime Logs provides an aggregated, near real-time view into recent application
logs generated by WordPress and Node.js environments on the WPVIP Platform. These
logs provide insights into the current health of an environment and can be helpful
for debugging issues.

Review [more details about Runtime Logs and existing limitations](https://docs.wpvip.com/runtime-logs/).

**Prerequisites**

 * [VIP-CLI is installed](https://docs.wpvip.com/vip-cli/installing-vip-cli/) and
   has been updated to [the most current version](https://www.npmjs.com/package/@automattic/vip/v/latest).
 * Retrieving Runtime Logs for an application requires a user to have at minimum
   an [Org member role](https://docs.wpvip.com/manage-user-access/vip-dashboard/org-roles)
   or an [App write role](https://docs.wpvip.com/app-role/) for that application.

VIP-CLI command: `[vip logs [options]](https://docs.wpvip.com/vip-cli/commands/logs/)`

Format of the `vip logs` command with available options:

    ```wp-block-preformatted
    vip @<app>.<env> logs [--type=app|batch] [--limit=<lines>] [--format=text|json|csv]
    ```

By default:

 * Logs are output to the terminal, but the [command output can be saved to a file](https://docs.wpvip.com/write-custom-wp-cli-commands/save-command-output/)
   by using `tee` or `>`.
 * 500 lines of the logs will be retrieved by default. This can be increased by 
   passing the `vip logs` command with the `--limit` option assigned to a higher
   integer, with a maximum limit of 5,000.

Example output of the Runtime Logs [VIP-CLI](https://docs.wpvip.com/vip-cli/) command
for a WordPress environment:

    ```wp-block-preformatted
    $ vip @example-app.production logs
    2022-01-05T21:37:11.159495287Z PHP message: Warning: Division by zero in /var/www/wp-content/client-mu-plugins/errors.php on line 4 [example-app.go-vip.net/?warning=1] [wp-content/mu-plugins/z-client-mu-plugins.php:119 include_once('wp-content/client-mu-plugins/errors.php'), wp-settings.php:340 include_once('wp-content/mu-plugins/z-client-mu-plugins.php'), wp-config.php:53 require_once('wp-settings.php'), wp-load.php:50 require_once('wp-config.php'), wp-blog-header.php:13 require_once('wp-load.php'), index.php:17 require('wp-blog-header.php')]
    2022-01-05T21:37:15.683692218Z PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function invalid_function() in /var/www/wp-content/client-mu-plugins/errors.php:8
    2022-01-05T21:37:15.683720541Z Stack trace:
    2022-01-05T21:37:15.683723928Z #0 /var/www/wp-content/mu-plugins/z-client-mu-plugins.php(119): include_once()
    2022-01-05T21:37:15.683727274Z #1 /var/www/wp-settings.php(340): include_once('/var/www/wp-con...')
    2022-01-05T21:37:15.683730831Z #2 /var/www/wp-config.php(53): require_once('/var/www/wp-set...')
    2022-01-05T21:37:15.683733847Z #3 /var/www/wp-load.php(50): require_once('/var/www/wp-con...')
    2022-01-05T21:37:15.683736782Z #4 /var/www/wp-blog-header.php(13): require_once('/var/www/wp-loa...')
    2022-01-05T21:37:15.683739788Z #5 /var/www/index.php(17): require('/var/www/wp-blo...')
    2022-01-05T21:37:15.683743695Z #6 {main}
    2022-01-05T21:37:15.683746701Z   thrown in /var/www/wp-content/client-mu-plugins/errors.php on line 8
    ```

## Automatically retrieve new logs

To automatically retrieve new logs without needing to re-run the `vip logs` command,
pass the `--follow` option. This will enable new logs to be retrieved as they are
generated. This option is useful for tools that ingest logs for long term storage
and analysis (e.g. [Splunk](https://www.splunk.com/) or ELK). Because logs do not
persist on containers, there is no guarantee that all log entries will be received.
Review the [Limitations** **of** **Runtime Logs](https://docs.wpvip.com/runtime-logs/#h-limitations)
for more details.

## Troubleshooting

### `No logs found`

If a new deployment was made recently, wait a few seconds for logs to regenerate
on the containers.

### `Error: Resource not found`

A value used in the `vip logs` command to [target an application or the environment](https://docs.wpvip.com/target-environments-for-vip-cli/)
may be incorrect, or the user running the command does not have the required minimum
of [Org member role](https://docs.wpvip.com/manage-user-access/vip-dashboard/org-roles)
or [App write role](https://docs.wpvip.com/manage-user-access/vip-dashboard/app-role)
to retrieve logs for that application. 

### `Error: Too many requests, please try again in [] seconds.`

Log requests are rate limited per-user and per-application. Wait the recommended
amount of time provided in the error message before attempting a new request.

Last updated: February 03, 2026