Matomo application logs are messages that are written by Matomo.

You can view logs by installing the LogViewer plugin. The plugin can be installed via the Matomo Marketplace with just a few clicks in your Matomo installation. As a Super User simply go to the Administration and select Marketplace in the left menu. There you will find the plugin and can install it with just one click.

This plugin will be useful if you experience any problem and want to troubleshoot your Matomo installation, for example when some tracking requests are not processed correctly.

LogViewer plugin

Configuring logging in Matomo

By default Matomo won’t show anything in the LogViewer plugin as logs are written only to screen. In order to actually view logs you need to enable either logging to file or to the database or to errorlog (logs using the error_log() php function) or to syslog (logs to the syslog service).

The database log writer is recommended when you use more than one server for your Matomo installation.

You can read about this in detail in the FAQ article How do I enable logging in Matomo.

In most cases it is enough to add the following lines to your config/config.ini.php file:

[log]
log_writers[] = file

The Matomo application log is located at piwik/tmp/logs/matomo.log.

If you do not see any log messages afterwards this might be just because there were no warnings or errors yet. You can increase the log level by adding the following line to the [log] section to see if it works in general:

log_level = DEBUG

Enabling logging for Matomo Tracker

The Matomo Tracker API (piwik.php) needs an additional configuration in order to actually log messages. See the documentation page about enabling Debug logging in the piwik.php tracker

Using the LogViewer plugin

Once logging is configured you can view the logged messages as a Super User by going to the Administration and selecting LogViewer from the Diagnostic section.

You can search for any log messages, filter by log level, switch between the file and database writer and export log messages. Handy is the possibility to narrow down the displayed messages by clicking on a column. For example you can click on a RequestId and see all messages that were logged during the same request.

Previous FAQ: Backup Matomo best practises – what to backup and how often