Add more context to globaltitlefail logs
authorKunal Mehta <legoktm@gmail.com>
Fri, 12 Dec 2014 19:04:33 +0000 (11:04 -0800)
committerKunal Mehta <legoktm@gmail.com>
Fri, 12 Dec 2014 19:04:33 +0000 (11:04 -0800)
Currently stuff like:
 MessageCache::parse called by Message::toString/Message::parseText/MessageCache::parse with no title set.

is showing up in the logs, and is totally useless.

Change-Id: I0ac3ca906c5a67e19974e3434d0e929e6b27fbb2

includes/context/RequestContext.php

index 2a610a3..fe17fde 100644 (file)
@@ -140,7 +140,7 @@ class RequestContext implements IContextSource {
                if ( $this->title === null ) {
                        global $wgTitle; # fallback to $wg till we can improve this
                        $this->title = $wgTitle;
-                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.' );
                }
 
                return $this->title;