---
title: "Streaming log entries in real time"
date: "2024-02-14T06:18:38+00:00"
summary: "Stream real-time log entries from multiple sources. Filter, pause, and analyze logs for efficient monitoring and troubleshooting."
image:
type: "page"
url: "/acquia-cloud-platform/streaming-log-entries-real-time"
id: "02059349-0c8b-47e2-a757-268938ab932c"
---

Important

Avoid using log streaming for persistent log transmission to internal or third-party log retention services. If you require this feature, contact your Acquia account manager to purchase Acquia’s [Log forwarding service](/acquia-cloud-platform/monitor-apps/logs/forwarding).

Besides downloading log files from the Cloud Platform interface or [accessing logs using command-line tools](/acquia-cloud-platform/monitor-apps/logs), you can also stream logs in real time using the Cloud Platform interface on the **Applications** \> **\[Environment\]** > **Logs** page. The Logs page stream shows log entries from all the logs of an environment at once. In contrast, each of the log files you can download shows a single log from an infrastructure (aside from the Drupal watchdog log and the MySQL slow query log).

Note

Update your [Node.js application](https://docs.acquia.com/acquia-cloud-platform/add-ons/node-js "https://docs.acquia.com/acquia-cloud-platform/add-ons/node-js") within the error-handling code so that the code can capture error information and display logs and error messages in log streaming. Node.js applications that capture logs through `console.log()` and error messages through `console.error()` can provide effective monitoring and troubleshooting.

There are several methods you can use to modify which log entries are streamed:

*   Click **Stream** to select which logs are the source of log entries to be streamed. By default, the PHP error and Apache error logs are enabled.
    
    ![cloud-platform_streaming-logs.png](https://acquia.widen.net/content/7855b70d-dda5-43f9-8a16-e52ae5393a51/web/cloud-platform_streaming-logs.png)
    
*   Filter the log stream using [JavaScript regular expressions](http://www.w3schools.com/jsref/jsref_obj_regexp.asp). Type a regular expression and the log stream is filtered accordingly.
*   If you click a log entry or scroll down the log stream, new entries are not added to the display. Click **Show new messages** to return to the top of the log stream and show the most recent log entries.
*   Click **Pause** to pause the log stream, and **Restart** to restart the log stream. When you restart the log stream after pausing it, the Logs page displays current log entries and doesn’t display all the entries that occurred while it was paused.
*   To clear all the log entries, click **Clear**.
*   To download a log file, select **Logs** > **Download**. For more information, see [Downloading active log files](/acquia-cloud-platform/monitor-apps/logs#cloud-download-logs-ui).
    
    ![cloud-platform_downloading-logs.png](https://acquia.widen.net/content/27215bf3-f400-4249-8ba6-969199ba0f47/web/cloud-platform_downloading-logs.png)
    

Important

If the rate of messages goes beyond 500 messages per second during log streaming for an environment, you might experience delays in your stream. This lag might be caused due to latency in the network. However, the system does not drop any messages. 

Color coding for log entries
----------------------------

Log entries are displayed with different colored bars at the left margin:

Log source

Bar color

Apache error

Red

Apache request

Yellow

Balancer request

Green

Drupal request

Yellow

MySQL slow query

Red

Node.js error

Red

PHP error

Red

Varnish® request

Green

### Streaming logs from the command line

In addition to streaming logs on the **Logs** page, you can use the Logstream Ruby gem, which provides a client-side API library and command-line interface. [Learn more about how to install and use Logstream](https://github.com/acquia/logstream).

### Related topics

*   [About Cloud Platform logging](/acquia-cloud-platform/monitor-apps/logs)
*   [Searching the error logs to troubleshoot problems](/acquia-cloud-platform/help/92891-searching-error-logs-troubleshoot-problems "Searching the error logs to troubleshoot problems")