r105655 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105654‎ | r105655 | r105656 >
Date:06:03, 9 December 2011
Author:tstarling
Status:ok
Tags:
Comment:
Revert r102504 (allow ESC in debug output): the justification in the comment above seems very reasonable to me, and is in fact an argument for stripping only ESC, since that's the only character that can change terminal modes. You could always make a highlighter pipe script for your wfDebugGreen(), instead of tailing the log directly.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -830,7 +830,7 @@
831831 if ( $wgDebugLogFile != '' && !$wgProfileOnly ) {
832832 # Strip unprintables; they can switch terminal modes when binary data
833833 # gets dumped, which is pretty annoying.
834 - $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1a\x1c-\x1f]!', ' ', $text );
 834+ $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text );
835835 $text = $wgDebugLogPrefix . $text;
836836 wfErrorLog( $text, $wgDebugLogFile );
837837 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102504Allow \x1b (ascii ESC) in wfDebug() output...hashar10:24, 9 November 2011

Status & tagging log