Opened 5 years ago

Closed 5 years ago

#944 closed New feature (fixed)

Timestamp in log files should appear before the message

Reported by: anush Owned by:
Priority: low Milestone: Piwik 0.4.4
Component: Core Keywords: logger
Cc: Sensitive: no


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.

Attachments (1)

Log.php.patch (420 bytes) - added by anush 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by anush

comment:1 Changed 5 years ago by matt (mattab)

  • Milestone set to 1 - Piwik 0.4.4

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

comment:2 Changed 5 years ago by anush

(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.

comment:3 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.