Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgDebugLogGroups and the translation is 23% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎català • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎suomi • ‎中文 • ‎日本語
デバッグ/ロギング: $wgDebugLogGroups
Direct wfDebugLog() output for certain groups to files other than $wgDebugLogFile .
導入されたバージョン:1.5.0 (r10598)
許容される値:(array of log group keys to filenames)
その他の設定: アルファベット順 | 機能順


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.

Later versions of MediaWiki will not use this variable unless $wgDebugLogFile is also set.

Log destinations may be one of the following:

  • false to completely remove from the output, including from $wgDebugLogFile.
  • string values specifying a filename or URI.
  • associative array with keys:
    • 'destination' desired filename or URI.
    • 'sample' an integer value, specifying a sampling factor (optional)
    • 'level' A \Psr\Log\LogLevel constant, indicating the minimum level log (optional, since 1.25)

When $wgMWLoggerDefaultSpi is set to a non-default value, $wgDebugLogGroups will probably be ignored, and the method of configuring log files will be determined by whatever logging system is invoked by $wgMWLoggerDefaultSpi.

この例では、グループ「ConfirmEditExtension」のデバッグ メッセージは「ext_confirmedit.log」に、「FCKeditor」および「FCKeditorExtension」のデバッグ メッセージは「ext_fckeditor.log」に、それぞれ出力されます。

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


$wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';


 $wgDebugLogGroups['memcached'] = array(
     'destination' => '/var/log/mediawiki/memcached.log',
     'sample' => 1000,  // log 1 message out of every 1,000.
     'level' => \Psr\Log\LogLevel::WARNING,
 $wgDebugLogGroups['redis'] = array(
     'destination' => '/var/log/mediawiki/redis.log',
     // Level can also be the literal string value of any Psr\Log\LogLevel constant
     'level' => 'info',

Some common debug log groups

  • exception, error, fatal - errors
  • deprecated - deprecation warnings
  • objectcache, caches, memcached/SQLBagOStuff - cache
  • DBPerformance, DBReplication, DBConnection - database
  • DBQuery - all DB queries
  • cookie - response cookies
  • exec - shell commands
  • session - SessionManager
  • authentication, login - AuthManager
  • ratelimit, throttler - hitting rate limits ($wgRateLimits and other)
  • resourceloader, ResourceLoaderImage - ResourceLoader
  • http, HttpError - HTTP requests to external services (via the Http/MwHttpRequest classes)
  • api - API
  • thumbnail, fileupload, fileconcatenate - image-related
  • runJobs - job queue
  • parser, ParserCache - parser
  • slow-parse - warnings about pages that take long to parse