Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Timestamp in log files should appear before the message #944

Closed
anushr opened this Issue · 4 comments

3 participants

@anushr

The timestamp in all the log files (logger_message, logger_error, logger_exception) are currently place after the actual message. This is due to the fact the the Piwik_Log_Formatter_FileFormatter implodes the $event array and just writes it to the file without placing the 'timestamp' item ahead of others.

I propose putting the timestamp in front so that its easier for auditing/debugging purposes.

I've attached a patch file with my proposed change.
Keywords: logger

@anushr

Attachment:
Log.php.patch

@mattab
Owner

Appart from this suggestion, do you find the logging mechanism useful as such? would it need other features?

@anushr

(I suppose I should have categorized this as a bug rather than a feature request -- my mistake)

I think the logging mechanism does what its supposed to do without the burden of additional feature overhead.

Although, one thing I can think of... the ability to specify a "debug" level might be nice to have so that a dev instance can log these while a prod instance wont.

@robocoder
Collaborator

In [1467], fixes #944 - Timestamp in log files should appear before the message

@anushr anushr added this to the Piwik 0.4.4 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.