Page MenuHomePhorge

CreateWiki::addToAnalytics should log to its own file
Open, NormalPublic

Description

CreateWiki::addToAnalytics currently throws a rather helpful line to the error log if we can't add wikis to the analytics setup.

This really needs to go to its own file - it'll enable us to easily review wikis that need to be added as soon as we decide how we want to add them to the setup, as well as allow us to manually sort any errors after that. The server error logs need to be rotated far too regularly to do this with these.

Event Timeline

Quoth lines 315-319 of /extensions/CreateWiki/CreateWiki_backend.php:

		// Allow this feature to be turned off, because history has sadly taught
		// us that we might need to do that every now and then...
		// This has to be here instead of being at the very beginning of this
		// function so that we can use the $wikiId variable here.
		if ( $wgCreateWikiAnalyticsLogMode && $wgCreateWikiAnalyticsLogFile ) {

Set $wgCreateWikiAnalyticsLogMode to true and $wgCreateWikiAnalyticsLogFile to a valid path and it won't even try to query the analytics DB, but rather writes the data to a comma-separated file.
If those variables aren't set and thus a connection to the analytics DB is attempted, in lines 351-353 we log the error message to both CW's own log ($wgDebugLogFile['CreateWiki']) as well as the standard error log (error_log()). Do you want the ordinary error_log removed and/or a new wfDebugLog call with a new group name (such as CreateWikiAnalytics) inserted?

lewiscawte triaged this task as Normal priority.Nov 11 2016, 1:01 PM