Manual talk:$wgDebugLogGroups

About this board

wgDebugLogGroups: logfile specified but not created - no SELinux entries

2
UweAtwork (talkcontribs)

In the hope to find the root-cause of authentication-issues, my configuration in LocalSettings-php looks like this:



$wgDebugLogFile = "/opt/log/mediawiki_debug.log";

$wgDebugLogGroups['authentication'] = "/opt/log/authentication.log";

$wgDebugLogGroups['login'] = "/opt/log/login.log";

$wgDebugLogGroups['PluggableAuth'] = "/opt/log/LDAP-Pluggable.log";

$wgDebugLogGroups['LDAP'] = "/opt/log/LDAP.log";

$wgDebugLogGroups['MediaWiki\\Extension\\LDAPProvider\\Client'] = "/opt/log/LDAPProvider_Client.log";

$wgDebugLogGroups['LDAPGroups'] = "/opt/log/LDAPGroups.log";

$wgDebugLogGroups['LDAPUserInfo'] = "/opt/log/LDAPUserInfo.log";

$wgDebugLogGroups['LDAPAuthentication2'] = "/opt/log/LDAPAuthentication2.log";

$wgDebugLogGroups['LDAPAuthorization'] = "/opt/log/LDAPAuthorization.log";



When I delete "/opt/log/mediawiki_debug.log" it sometimes gets recreated during restart of httpd - but not always (even if the service is running and the site is accessible).

Due to missing timestamps in "/opt/log/mediawiki_debug.log" the entries are useless.

I did not find any information about how to configure logging.

Is it possible to configure the structure of log-entries (like in log4j)?

All other files (like "/opt/log/LDAPAuthentication2.log") do not exist.

How to get that working? SELinux does not block file-access.

BDavis (WMF) (talkcontribs)
Reply to "wgDebugLogGroups: logfile specified but not created - no SELinux entries"

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

2
Dinoguy1000 (talkcontribs)

What are the "later versions" this note is talking about? As far as I can tell, this isn't true for current/recent versions of MediaWiki, and the note it replaced in this edit (pinging @MarkAHershberger: since he's the one who made the edit) stated explicitly that $wgDebugLogFile is not required to use $wgDebugLogGroups.

MarkAHershberger (talkcontribs)

Well, it has been two years since I made that edit and I don't remember making it or why. I've played around with the debugging logs, but not enough to know enough to say something this definitive.

I imagine I had a good reason for saying it, but I should have supported it better. Feel free to revert.

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

Triggering file logging

3
Kghbln (talkcontribs)

Apart form defining the log groups: Do I have to set the follwing in my "LocalSettings.php" file, e.g.:

error_reporting( -1 );
ini_set( 'display_errors', 1 );

The reason I am asking is that I would not like to expose anything that is logged to the visitor's attention but still log the issues they create. So I would like to avoid such a setting as shown above.

BDavis (WMF) (talkcontribs)

Neither of these settings should be needed or desired in a production wiki.

Kghbln (talkcontribs)

Thanks a lot for confirming. Otherwise it would only be half of the fun to log errors etc. I asked since the settings above manipulate the PHP layer which may influence everything that comes behind it. The logging is however smart enough. :)

Reply to "Triggering file logging"
There are no older topics
Return to "$wgDebugLogGroups" page.