@mattab opened this Issue on August 18th 2015 Owner

Creating useful log files is a key part of building a useful, scalable and easy to manage software product. At Piwik recently we improved our logging backend, re-using monolog, and we've improve logging messages regularly in last releases.

To enable logging we point users to this FAQ: I’m a developer, how do I enable logging (and / or SQL profiling) in Piwik?. Currently, it is possible to debug the tracker by outputting results to the HTTP output (see this help).

The goal of this issue is to also provide a way for users to enable logging during Piwik Tracker (piwik.php API endpoint).

Steps:

Thoughts?

@mattab commented on August 18th 2015 Owner

Targetting for 2.15.0 as IMO we need good logging capabilities in Tracker in LTS.

@tsteur commented on August 19th 2015 Owner

Looks up to date

I do not really understand what is meant by all tracker requests. Once tracker debug is enabled the requests will be logged as described on that page

@diosmosis commented on August 25th 2015 Member

check FAQ is up to date: https://piwik.org/faq/troubleshooting/faq_115/

In http://developer.piwik.org/api-reference/tracking-api#debugging-the-tracker there should be a note about the [Tracker] debug_on_demand option.

@tsteur commented on August 25th 2015 Owner

Not sure if we should actually mention debug_on_demand it as it is potentially a security risk when people forget to turn it off again. I added a note about that recently in global.ini.php. Was discussing with @mattab recently and we were thinking about displaying a notification in the UI as long as it is enabled. It can be mentioned but we definitely need to mention the security risk and maybe even display a notification while it is enabled.

@diosmosis commented on August 25th 2015 Member

Notification sounds good. The option is very useful in some situations, eg, when troubleshooting production instances or apps that use the tracker API (eg, the log importer). Perhaps a IP whitelist or host whitelist can be used as well to make sure no one else sees the debug output.

We should also perhaps not log token auths (or at least whole ones) in tracker debug output.

@tsteur commented on September 4th 2015 Owner

Added debug_on_demand to developer docs

@mattab commented on September 8th 2015 Owner

Very nice & useful!

This Issue was closed on September 4th 2015
Powered by GitHub Issue Mirror