Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204436

Change subject: Add timestamps to wfDebug formatter
......................................................................

Add timestamps to wfDebug formatter

Similar to those in the wfLogDBError formatter.
Because $wgDebugTimestamps only adds relative time offsets. It
doesn't help correlate different requests to each other.

Change-Id: Ie2d95ad5247187078e15338cc9f10b4ed9dad9a6
---
M includes/debug/logger/LegacyLogger.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/204436/1

diff --git a/includes/debug/logger/LegacyLogger.php 
b/includes/debug/logger/LegacyLogger.php
index edaef4a..e59d728 100644
--- a/includes/debug/logger/LegacyLogger.php
+++ b/includes/debug/logger/LegacyLogger.php
@@ -237,7 +237,12 @@
                if ( isset( $context['prefix'] ) ) {
                        $text = "{$context['prefix']}{$text}";
                }
-               return "{$text}\n";
+
+               global $wgDBerrorLogTZ;
+               $d = date_create( 'now', new DateTimeZone( $wgDBerrorLogTZ ) );
+               $date = $d->format( 'D M j G:i:s T Y' );
+
+               return "{$date}\t{$text}\n";
        }
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/204436
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2d95ad5247187078e15338cc9f10b4ed9dad9a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to