Jump to content

Manual:$wgDebugLogGroups: Difference between revisions

From mediawiki.org
Content deleted Content added
Update example; remove outdated stuff.
Fix file paths; the files should not be publicly accessible as they might contain sensitive data.
Line 30: Line 30:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgDebugLogGroups = array(
$wgDebugLogGroups = array(
'ConfirmEditExtension' => $IP . '/debug-ext_confirmedit.log',
'ConfirmEditExtension' => $IP . '/../../home/debug-ext_confirmedit.log',
'SpamRegex' => $IP . '/debug-spam.log',
'SpamRegex' => $IP . '/../../home/debug-spam.log',
);
);
</syntaxhighlight>
</syntaxhighlight>

Revision as of 14:10, 30 October 2015

Debug: $wgDebugLogGroups
Direct wfDebugLog() output for certain groups to files other than $wgDebugLogFile .
Introduced in version:1.5.0 (r10598)
Removed in version:Still in use
Allowed values:array of log group keys to filenames
Default value:array()

Details

Set to an array of log group keys to filenames. If set, wfDebugLog() output for that group will go to that file instead of the regular $wgDebugLogFile . Useful for enabling selective logging in production.

If a group is configured in $wgDebugLogGroups, then all debug messages with the according group key will be logged to that file, also if $wgDebugLogFile is not set!

Example

$wgDebugLogGroups = array(
	'ConfirmEditExtension'	=> $IP . '/../../home/debug-ext_confirmedit.log',
	'SpamRegex'		=> $IP . '/../../home/debug-spam.log',
);

This example logs debug messages of group "ConfirmEditExtension" to "debug-ext_confirmedit.log" and those of group "SpamRegex" to "debug-spam.log".

[[Category:Log variablesTemplate:Translation|$wgDebugLogGroups]]