Table of Contents

In this article, you will learn about viewing your application's Access and Error logs using the Cloudways Platform. Here, access logs refer to the logs of Apache (for dynamic requests such as PHP requests), Nginx (for static assets such as images/JS/CSS), and PHP (detailed PHP process information such as files/routes, CPU, and memory consumption). On the other hand, error logs refer to the Apache Error Logs containing information about the issues an application encounters. This may include details of errors and warnings that indicate potential problems with an event or application configuration.

Analyzing logs can be beneficial when it comes to debugging, troubleshooting the application-level issues, and maintaining a good website's health because logs provide information about web requests, the status of requests, visitor's IP addresses, viewed pages, user-agent(s), PHP processes, CPU, and memory consumption.

How to View Access & Error Logs

Application logs can be monitored effortlessly using the Cloudways Platform or remotely connecting the server via SSH/SFTP. This is a very recent value addition done by Cloudways to enable the functionality of viewing the application logs directly from the Cloudways Platform without connecting to the server, so here is how you can do it.

Tip

The logs section of the Cloudways Platform will only display the recent 1000 log entries of Apache, Nginx, and PHP individually. Still, if you are looking to view the previous logs as well, then you need to connect to your server via SSH/SFTP.

Step #1 — Navigate to Your Application

Log in to the Cloudways Platform, click on the Servers tab from the top menu bar and choose your target server on which the desired application is deployed.

Next, click on the www icon located on the right-hand side of the server tab.

Select a target application from the drop-down list.

Step #2 — Check Logs

Next, click on the Monitoring option from the left menu bar to expand it.

Next, click on the Logs to expand it as well.

Finally, you will see two options of Access Logs and Error Logs.

1. Access Logs

The Access Logs section will display your application's recent 1000 access log entries, as mentioned earlier. It will show a few logs by default, but you can drag the vertical slider across to view more.

  1. You can switch between the tabs to view the other access logs (e.g., PHP and Nginx).

  2. The search box can be used to locate a specific log record in the given list.

  3. The filter can also be applied to the logs to narrow the search. However, the filter is only applicable to those methods (e.g., PUT, POST, etc.) and status codes (e.g., 200, 301, etc.) present in the last 1000 log entries.

  4. Most recent logs can be obtained by simply clicking on the refresh button.

2. Error Logs

The Error Logs section will display your application's recent 1000 Apache error logs. By default, it will show a few logs, but you can drag the vertical slider across to view more.

  1. The search box can be used to locate a specific log record in the given list.

  2. The filter can also be applied to the logs to narrow the search. However, the filter is only applicable to those PHP errors (e.g., Fatal error, Parse error, etc.) present in your last 1000 log entries.

  3. Most recent logs can be obtained by simply clicking on the refresh button.

That's it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?