Log component: use fileFormatter when writing to file #3690

Closed
BrainCrumbz opened this Issue Jan 18, 2013 · 3 comments

2 participants

@BrainCrumbz

In the Log component, addWriteToFile method, as in:
https://github.com/piwik/piwik/blob/master/core/Log.php#L56

the set formatter is $this->screenFormatter.

Shouldn't that be $this->fileFormatter instead?

@mattab
Piwik Open Source Analytics member

it probably should indeed. Have you used it or just noticed it? we'll investigate

@BrainCrumbz

We've used that during some debug session. After the switch, we saw an output change from:

CACHE_CONTROL: max-age=0\r\nCONNECTION: keep-alive\r\n<br/>

to:

CACHE_CONTROL: max-age=0 CONNECTION: keep-alive

So the &lt;br/> disappeared, but the \r\n were not replaced with actual carriage returns.

@mattab
Piwik Open Source Analytics member

In 05de97e: Fixes #3690 Thanks for the report & patch!

@BrainCrumbz BrainCrumbz added this to the 1.11 - Piwik 1.11 milestone Jul 8, 2014
@mattab mattab was assigned by BrainCrumbz Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment