New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I enable debug logging in Piwik Tracker? #8593

Closed
mattab opened this Issue Aug 18, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@mattab
Member

mattab commented Aug 18, 2015

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 mattab added this to the 2.15.0 milestone Aug 18, 2015

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 18, 2015

Member

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

Member

mattab commented Aug 18, 2015

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

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Aug 19, 2015

Member

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

Member

tsteur commented Aug 19, 2015

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

This comment has been minimized.

Show comment
Hide comment
@diosmosis

diosmosis Aug 25, 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.

Member

diosmosis commented Aug 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Aug 25, 2015

Member

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.

Member

tsteur commented Aug 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@diosmosis

diosmosis Aug 25, 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.

Member

diosmosis commented Aug 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 4, 2015

Member

Added debug_on_demand to developer docs

Member

tsteur commented Sep 4, 2015

Added debug_on_demand to developer docs

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 8, 2015

Member

Very nice & useful!

Member

mattab commented Sep 8, 2015

Very nice & useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment