View Log Data | MuleSoft Documentation
# View Log Data
CloudHub provides access to log data that includes deployment messages and events for each worker and Mule runtime engine logs.
Logs and diagnostics are currently available only for applications deployed to CloudHub workers. For applications deployed to a local server, you can send data to external analytics software. See Export Data to External Analytics Tools.
For more advanced searching and log management, you can:
  * Use Anypoint Monitoring.
See Anypoint Monitoring Overview.
  * Integrate your CloudHub app with your logging system using the Log4j configuration.
See Integrate with Your Logging System Using Log4j.


## View Logs
To view logs for applications deployed to CloudHub:
  1. In Anypoint Platform, select **Runtime Manager**.
  2. In the Runtime Manager navigation menu, click **Applications** , and then click the application name.
  3. In the navigation menu, click **Logs**.
  4. In the **Deployments** section, filter the output by day, deployment, system log, and workers.
To remove a filter, deselect the checkbox for the date:
Figure 1. The arrow shows the checkbox to filter log output by deployment in the **Deployments** section.


## Download Logs
For each worker in a CloudHub deployment, you can download logs specific to that worker’s activity:
  1. In the **Deployments** section, select the date and worker for which you want to download logs.
  2. Click the download icon for the worker and select **Logs** :
Figure 2. The arrow shows the icon to download log output by deployment in the **Deployments** section.


CloudHub downloads the log output to a text file in the format `_deploymentID_._instanceID_-_workerNumber_.log`. Use a text editor to view the log file.
To archive or download CloudHub application logs for audit, analytics, or other purposes at regular intervals, use the custom log appender to extract logs. See Integrate with Your Logging System Using Log4j.
## Download Diagnostics
Diagnostics display the Java thread dump of each CloudHub worker in each deployment. These indicate the current state of the server, which is helpful for debugging and support.
Diagnostics are not available for apps running on Mule versions earlier than 3.8.0 (excluding version 3.7.4).
To download diagnostics:
  1. In the **Deployments** section, select the date and worker for which you want to download diagnostics.
  2. Click the download icon for the worker and select **Diagnostics** :
Figure 3. The arrow shows the icon to download diagnostics by worker in the **Deployments** section.


CloudHub downloads the diagnostic output to a text file in the format `_appName_-instance-_instanceID_-_workerNumber_-diag.txt`. Use a text editor to view the diagnostics file.
You can also use the following URL to download a diagnostics file directly: `api/v2/applications/_appName_/instances/_instanceId_/diagnostics`  
---  
## Download Mule Logs
Mule logs display the logs of the Mule runtime engine for CloudHub. The Mule log contains information about app and lifecycle events. For example, the log records an entry when a Mule service or app starts, deploys, stops, or undeploys.
  1. In the **Deployments** section, select the date and worker for which you want to download Mule logs.
  2. Click the download icon for the worker and select **Mule Logs** :
Figure 4. The arrow shows the icon to download Mule log output by deployment in the **Deployments** section.


CloudHub downloads the Mule log output to a text file in the format `_appName_-instance-_instanceID_-_workerNumber_-mule_ee.log`. Use a text editor to view the log file.
For more information about Mule logs, see Runtime Log.
## Deployment History Persistence
CloudHub stores up to 30 days of inactive deployments history based on the last modified time of the deployment.
## Log Persistence
CloudHub stores up to 100 MB of log data per application per worker, or up to 30 days, whichever limit is reached first.
## Log Timezones
CloudHub stores log data in Universal Time (UTC); however, the console displays the log using your computer’s local time zone.
## Search Logs
Search for logs that contain specified values or search for logs by date and priority.
To search logs:
  1. Enter a value in the search box, or click **Advanced** to search for logs for a specified time, day, date range, and message priority.
  2. Click **Apply**.
Figure 5. The screenshot shows (**1**) **Advanced** search and (**2**) **Priority** on the **Logs** page.


You can search with queries. For more information, see Log Search Syntax.
### Search by Date and Time
The **Date & Time** filter lets you search the log by specifying a date range. Possible values are:
  * **Last hour**
  * **Last 24 hours**
  * **Last week**
  * **Last month**


### Search by Message Priority
The **Priority** filter lets you view specific events in the log. You can also specify different priorities by typing `priority<type>` in the search box, as shown in the **Command** column in the table.
Possible values are:
Value | Description | Command  
---|---|---  
All Priorities |  List all messages  
List only error messages, such as when an exception occurs. |  priority:ERROR  
List only fatal messages for when an application fails |  priority:FATAL  
List informative messages |  priority:INFO  
List messages about application and worker startup |  priority:SYSTEM  
List message about console events such as setting the object store |  priority:CONSOLE  
List warning messages |  priority:WARN  
List debugging messages |  priority:DEBUG  
Heap dumps cannot be shared. Instead, our **Support Center** representatives can analyze the dumps and share the required information with you.   
---  
## See Also
  *   * Export Data to External Analytics Tools
  * Integrate with Your Logging System Using Log4j
  * Monitor Applications and Servers
  *   *