Im a developer, how do I enable logging (and / or SQL profiling) in Piwik?
There are a few possibilities with regards to debug logging in Piwik: • Enable logging in the Tracker: see the documentation page about enabling Debug logging in the piwik.php tracker • Enable logging in the Piwik UI: if you are writing a plugin for example, you would need to output messages on screen (or in a file). To do so, you can edit your config.ini.php and add the following: [log] logger_message[] = “screen” • Enable SQL logging & profiling: to see the list of SQL queries executed by Piwik on any given page or widget, you must first enable logging on screen (see point above). Then, edit your config.ini.php and add the following:[Debug] enable_sql_profiler = 1 Piwik will then output all SQL queries, group them by unique query, and show the total time spent as well as average time spent on each query.