미디어위키 개발서버 로깅 설정

1 개요[ | ]

미디어위키 개발서버 로깅 설정
if (getenv('APP_DEBUG') == 'true' && getenv('APP_ENV') != 'production') {
    error_reporting(E_ALL);

    $wgDeprecationReleaseLimit = '1.38';
    $wgPasswordAttemptThrottle = false;
    $wgShowExceptionDetails = true;
    $wgDBerrorLog = "$IP/cache/dberror.log";

    $allGroups = [
        'exception', 'error', 'fatal',
        'deprecated',
        'objectcache', 'caches', 'memcached', 'SQLBagOStuff', 'redis',
        'rdbms',
        'cookie',
        'exec',
        'session',
        'authentication', 'login',
        'ratelimit', 'throttler',
        'resourceloader', 'ResourceLoaderImage',
        'http', 'HttpError',
        'api',
        'thumbnail', 'fileupload', 'fileconcatenate',
        'runJobs',
        'parser', 'ParserCache',
        'slow-parse',
    ];
    foreach ($allGroups as $group) {
        $wgDebugLogGroups[$group] = ['destination' => "$IP/cache/$group.log"];
    }
    $levelGroups = [
        'emergency' => [],
        'alert' => [],
        'critical' => [],
        'error' => [],
        'warning' => ['objectcache'],
        'notice' => ['api', 'session'],
        'info' => ['SQLBagOStuff', 'ParserCache'],
        'debug' => [],
    ];
    foreach ($levelGroups as $level => $groups) {
        foreach ($groups as $group) {
            $wgDebugLogGroups[$group]['level'] = $level;
        }
    }
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}