diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /www/wiki/includes/DevelopmentSettings.php |
first commit
Diffstat (limited to 'www/wiki/includes/DevelopmentSettings.php')
-rw-r--r-- | www/wiki/includes/DevelopmentSettings.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/www/wiki/includes/DevelopmentSettings.php b/www/wiki/includes/DevelopmentSettings.php new file mode 100644 index 00000000..55f16edb --- /dev/null +++ b/www/wiki/includes/DevelopmentSettings.php @@ -0,0 +1,57 @@ +<?php +/** + * Extra settings useful for MediaWiki development. + * + * To enable built-in debug and development settings, add the + * following to your LocalSettings.php file. + * + * require "$IP/includes/DevelopmentSettings.php"; + * + * Alternatively, if running phpunit.php (or another Maintenance script), + * you can use the --mwdebug option to automatically load these settings. + * + * @file + */ + +/** + * Debugging: PHP + */ + +// Enable showing of errors +error_reporting( -1 ); +ini_set( 'display_errors', 1 ); + +/** + * Debugging: MediaWiki + */ +global $wgDevelopmentWarnings, $wgShowDBErrorBacktrace, $wgShowExceptionDetails, + $wgShowSQLErrors, $wgDebugRawPage, + $wgDebugComments, $wgDebugDumpSql, $wgDebugTimestamps, + $wgCommandLineMode, $wgDebugLogFile, $wgDBerrorLog, $wgDebugLogGroups; + +// Use of wfWarn() should cause tests to fail +$wgDevelopmentWarnings = true; + +// Enable showing of errors +$wgShowDBErrorBacktrace = true; +$wgShowExceptionDetails = true; +$wgShowSQLErrors = true; +$wgDebugRawPage = true; // T49960 + +// Enable log files +$logDir = getenv( 'MW_LOG_DIR' ); +if ( $logDir ) { + if ( $wgCommandLineMode ) { + $wgDebugLogFile = "$logDir/mw-debug-cli.log"; + } else { + $wgDebugLogFile = "$logDir/mw-debug-www.log"; + } + $wgDBerrorLog = "$logDir/mw-dberror.log"; + $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log"; + $wgDebugLogGroups['exception'] = "$logDir/mw-exception.log"; + $wgDebugLogGroups['error'] = "$logDir/mw-error.log"; +} +unset( $logDir ); + +// Disable rate-limiting +$wgRateLimits = []; |