![]() ![]() > print wfMessage("Recentchanges")->plain() Debug comments reveal information in page views which could potentially expose security risks.Įval.php is an interactive script to evaluate and interact with MediaWiki objects and functions in a fully initialized environment. Use on production sites is not recommended. But it's not ideal for development use since data is lost on fatal errors and redirects. It's more secure than exposing the debug log file to the web, since the output only contains private data for the current user. This may occasionally be useful when supporting a non-technical end-user. Send debug data to an HTML comment in the output (If not set, the metrics are discarded.) You can work with StatsD locally (without needing a Graphite server) by starting a StatsD server and configuring it with the "backends/console" backend, which will output metrics to the console.Īs of MediaWiki 1.25, wfIncrStats() is a shortcut for the increment() method on the main RequestContext::getStats() instance. The metrics can be sent to a StatsD server, which may be specified via the wgStatsdServer configuration variable. $stats = $context -> getStats () $stats -> increment ( '' ) $stats -> timing ( '', $rtt ) If you need to share a debug log for diagnostic purposes, access the wiki without being logged in, and remove from the debug log any COOKIE lines, and don't capture any login attempt.Ĭreating a custom log file MediaWiki version: If this information is publicly accessible, attackers can use it to hack and compromise your machine and user account. The debug log file can contain private information such as login credentials, session cookies, and values of submitted forms. Some subsystems write to custom logs, see #Creating a custom log file to capture their output.ĭatabase transaction lifecycle debugging can be enabled for some databases with $wgDebugDBTransactions. This file will contain much debug information from MediaWiki core and extensions. */ $wgDebugLogFile = "/var/log/mediawiki/debug. * The filename is with the database name of the wiki. * But ensure that the directory is writeable by the PHP script running within your Web server. ![]() ** * The debug log file must never be publicly accessible because it contains private data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |