October 16, 2024

How to enable and use the Log Viewer in EspoCRM (Version 8.3 and Above)

Debugging application issues can be tricky, especially when it involves going through logs. In EspoCRM, the log viewer simplifies this process for admins by providing a graphical interface to access logs directly. This feature, introduced in version 8.3, allows admins to monitor, manage, and troubleshoot logs without manually accessing files on the server. In this article, we’ll guide you through enabling the log viewer and using it to track errors and warnings in EspoCRM.

Video

What is the Log Viewer in EspoCRM?

The log viewer is a convenient tool within EspoCRM’s Administration section that displays application logs directly in the CRM interface. Previously, admins had to manually access logs in server files, but now, logs can be monitored in real time through the GUI. This tool helps you identify system errors, warnings, and other issues that might be affecting your CRM instance.

Why Use the Log Viewer?

Logs are essential for diagnosing issues and understanding how your system is performing. Whether you’re troubleshooting errors or tracking warnings, logs are crucial. By enabling the log viewer, you can:

  • Easily access logs without diving into server files.
  • View real-time logs within the CRM interface.
  • Identify system issues faster, allowing for quicker resolutions.
  • Manage logs effectively, with options to view, delete, or set retention periods.

Step-by-Step Guide to Enable the Log Viewer

Before we dive into the process, please note that the log viewer is only available to EspoCRM admins and is accessible from version 8.3 onwards. Ensure your instance is up to date before proceeding.

Step 1: Access the Server

Log in to your server where EspoCRM is hosted. Navigate to the main directory where your CRM files are stored.

Step 2: Locate the Configuration File

Once you are in the main folder, look for a folder called data. Inside this folder, find the configuration file named config-internal.php.

Step 3: Modify the Configuration File

Open the config-internal.php file and look for the logger section. If the databaseHandler parameter is not present, you will need to add it manually.

Here’s the code you should add under the logger section:

'databaseHandler' => true,

Setting databaseHandler to true enables the log viewer in the GUI.

Step 4: Save, Clear Cache, and Rebuild

After editing the configuration file, save your changes. Next, clear the cache and rebuild your EspoCRM instance to ensure the changes are applied. You can do this by navigating to the Administration section and clicking on Clear Cache and Rebuild.

Step 5: Access the Log Viewer

Now, go to the Administration section in EspoCRM and select App Log. You will notice that it’s still empty. This is because logs from before the viewer was enabled will not appear. The log viewer will only display logs generated after logging into the UI is activated.

Testing the Log Viewer

To test the log viewer, create a record in a module, such as a task with attachments. This should trigger some errors or warnings in the logs. Once you’ve created the record, return to the App Log section.

You should now see errors and warnings logged. You can click on each log entry to view its details or remove specific log messages if necessary.

Managing Log Retention

In the config-internal.php file, you can specify how long logs should be retained in the log viewer. It’s important to manage this setting carefully, as having too many logs could affect your database performance. Adjust the retention period according to your system’s needs and your database capacity.

Final Thoughts

The log viewer is a powerful tool for admins to track and troubleshoot issues within EspoCRM. By enabling this feature, you gain real-time insights into errors and warnings, helping you maintain the smooth operation of your CRM.

If you haven’t already upgraded to version 8.3, make sure to do so to take advantage of this helpful feature.

Recent posts

Table of Contents

Unlock Your

25% Discount

Sign up and use code BLACKWEEK for an instant discount!
Click here to get more information.

Skip to content