Last active
August 29, 2015 13:56
-
-
Save bd808/8968097 to your computer and use it in GitHub Desktop.
MWLogger configuration of monolog in use in my MW-Vagrant instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Settings for monolog logging system | |
| */ | |
| $wgMWLoggerDefaultSpi = 'MWLoggerMonologSpi'; | |
| $wgMWLoggerMonologSpiConfig = array( | |
| 'loggers' => array( | |
| '@default' => array( | |
| 'processors' => array( 'wiki', 'psr', 'pid', 'uid', 'web' ), | |
| 'handlers' => array( 'default' ), | |
| ), | |
| 'profileoutput' => array( | |
| 'processors' => array( 'wiki', 'psr', 'pid', 'uid', 'web' ), | |
| 'handlers' => array( 'profiler' ), | |
| ), | |
| 'resourceloader' => array( | |
| 'processors' => array( 'wiki', 'psr', 'pid', 'uid', 'web' ), | |
| 'handlers' => array( 'resourceloader' ), | |
| ), | |
| ), | |
| 'processors' => array( | |
| 'wiki' => array( | |
| 'class' => 'MWLoggerMonologProcessor', | |
| ), | |
| 'psr' => array( | |
| 'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor', | |
| ), | |
| 'pid' => array( | |
| 'class' => '\\Monolog\\Processor\\ProcessIdProcessor', | |
| ), | |
| 'uid' => array( | |
| 'class' => '\\Monolog\\Processor\\UidProcessor', | |
| ), | |
| 'web' => array( | |
| 'class' => '\\Monolog\\Processor\\WebProcessor', | |
| ), | |
| ), | |
| 'handlers' => array( | |
| 'default' => array( | |
| 'class' => 'MWLoggerMonologHandler', | |
| 'args' => array( "{$mwLogDir}/monolog-" . date('Ymd') . '.log' ), | |
| 'formatter' => 'logstash', | |
| ), | |
| 'profiler' => array( | |
| 'class' => 'MWLoggerMonologHandler', | |
| 'args' => array( "{$mwLogDir}/profiler-" . date('Ymd') . '.log' ), | |
| 'formatter' => 'logstash', | |
| ), | |
| 'resourceloader' => array( | |
| 'class' => 'MWLoggerMonologHandler', | |
| 'args' => array( "{$mwLogDir}/resourceloader-" . date('Ymd') . '.log' ), | |
| 'formatter' => 'logstash', | |
| ), | |
| ), | |
| 'formatters' => array( | |
| 'line' => array( | |
| 'class' => '\\Monolog\\Formatter\\LineFormatter', | |
| ), | |
| 'logstash' => array( | |
| 'class' => '\\Monolog\\Formatter\\LogstashFormatter', | |
| 'args' => array( 'mediawiki', php_uname( 'n' ), null, '', 1 ), | |
| ), | |
| ), | |
| ); | |
| $wgDebugLogGroups = array( | |
| '404' => "{$mwLogDir}/404.log", | |
| 'AntiBot' => "{$mwLogDir}/AntiBot.log", | |
| 'antispoof' => "{$mwLogDir}/antispoof.log", | |
| 'api' => "{$mwLogDir}/api.log", | |
| 'badpass' => "{$mwLogDir}/badpass.log", | |
| 'Bug54847' => "{$mwLogDir}/Bug54847.log", | |
| 'Bug58676' => "{$mwLogDir}/Bug58676.log", | |
| 'captcha' => "{$mwLogDir}/captcha.log", | |
| 'CentralAuth' => "{$mwLogDir}/CentralAuth.log", | |
| 'CirrusSearch' => "{$mwLogDir}/CirrusSearch.log", | |
| 'CirrusSearchChangeFailed' => "{$mwLogDir}/CirrusSearchChangeFailed.log", | |
| 'CirrusSearchRequests' => "{$mwLogDir}/CirrusSearchRequests.log", | |
| 'CirrusSearchSlowRequests' => "{$mwLogDir}/CirrusSearchSlowRequests.log", | |
| 'cite' => "{$mwLogDir}/cite.log", | |
| 'DBPerformance' => "{$mwLogDir}/DBPerformance.log", | |
| 'es-hit' => "{$mwLogDir}/es-hit.log", | |
| 'EventLogging' => "{$mwLogDir}/EventLogging.log", | |
| 'exception' => "{$mwLogDir}/exception.log", | |
| 'exception-json' => "{$mwLogDir}/exception-json.log", | |
| 'exec' => "{$mwLogDir}/exec.log", | |
| 'ExternalStoreDB' => "{$mwLogDir}/ExternalStoreDB.log", | |
| 'FileOperation' => "{$mwLogDir}/FileOperation.log", | |
| 'Flow' => "{$mwLogDir}/Flow.log", | |
| 'generated-pp-node-count' => "{$mwLogDir}/generated-pp-node-count.log", | |
| 'GettingStarted' => "{$mwLogDir}/GettingStarted.log", | |
| 'jobqueue' => "{$mwLogDir}/jobqueue.log", | |
| 'JobQueueRedis' => "{$mwLogDir}/JobQueueRedis.log", | |
| 'lc-recache' => "{$mwLogDir}/lc-recache.log", | |
| 'logging' => "{$mwLogDir}/logging.log", | |
| 'MassMessage' => "{$mwLogDir}/MassMessage.log", | |
| 'memcached-serious' => "{$mwLogDir}/memcached-serious.log", | |
| 'MessageCache' => "{$mwLogDir}/MessageCache.log", | |
| 'mobile' => "{$mwLogDir}/mobile.log", | |
| 'mwsearch' => "{$mwLogDir}/mwsearch.log", | |
| 'oai' => "{$mwLogDir}/oai.log", | |
| 'OutputBuffer' => "{$mwLogDir}/OutputBuffer.log", | |
| 'poolcounter' => "{$mwLogDir}/poolcounter.log", | |
| 'query' => "{$mwLogDir}/query.log", | |
| 'recursion-guard' => "{$mwLogDir}/recursion-guard.log", | |
| 'redis' => "{$mwLogDir}/redis.log", | |
| 'resourceloader' => "{$mwLogDir}/resourceloader.log", | |
| 'runJobs' => "{$mwLogDir}/runJobs.log", | |
| 'session' => "{$mwLogDir}/session.log", | |
| 'SimpleAntiSpam' => "{$mwLogDir}/SimpleAntiSpam.log", | |
| 'slow-parse' => "{$mwLogDir}/slow-parse.log", | |
| 'SpamBlacklistHit' => "{$mwLogDir}/SpamBlacklistHit.log", | |
| 'SpamRegex' => "{$mwLogDir}/SpamRegex.log", | |
| 'SQLBagOStuff' => "{$mwLogDir}/SQLBagOStuff.log", | |
| 'SwiftBackend' => "{$mwLogDir}/SwiftBackend.log", | |
| 'temp-debug' => "{$mwLogDir}/temp-debug.log", | |
| 'texvc' => "{$mwLogDir}/texvc.log", | |
| 'thumbnail' => "{$mwLogDir}/thumbnail.log", | |
| 'torblock' => "{$mwLogDir}/torblock.log", | |
| 'ts_badpass' => "{$mwLogDir}/ts_badpass.log", | |
| 'updateTranstagOnNullRevisions' => "{$mwLogDir}/updateTranstagOnNullRevisions.log", | |
| 'upload' => "{$mwLogDir}/upload.log", | |
| 'wap' => "{$mwLogDir}/wap.log", | |
| 'wikibase' => "{$mwLogDir}/wikibase.log", | |
| 'zero' => "{$mwLogDir}/zero.log", | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment