Logging: adjust the log entry levels

Most info-level log entries are actually debug messages, which should
not end up in the production log by default, so adjust them.

Only the Mathoid-powered TeX check fail has been promoted to info so
that we can quickly identify such requests from pages.

Bug: T121445
Change-Id: I3736c59f6425d675befea9438182ee1cdebe5fc5
This commit is contained in:
Marko Obrovac 2015-12-15 00:14:15 +01:00
parent c3ebc54994
commit a3072e273b
4 changed files with 6 additions and 6 deletions

View file

@ -202,7 +202,7 @@ class MathHooks {
}
if ( $renderer->render() ) {
LoggerFactory::getInstance( 'Math' )->info( "Rendering successful. Writing output" );
LoggerFactory::getInstance( 'Math' )->debug( "Rendering successful. Writing output" );
$renderedMath = $renderer->getHtmlOutput();
} else {
LoggerFactory::getInstance( 'Math' )->warning(

View file

@ -165,7 +165,7 @@ abstract class MathRenderer {
default:
$renderer = new MathMathML( $tex, $params );
}
LoggerFactory::getInstance( 'Math' )->info( 'Start rendering $' . $renderer->tex .
LoggerFactory::getInstance( 'Math' )->debug( 'Start rendering $' . $renderer->tex .
'$ in mode ' . $mode );
return $renderer;
}
@ -322,7 +322,7 @@ abstract class MathRenderer {
# Now save it back to the DB:
if ( !wfReadOnly() ) {
$dbw = $dbw ?: wfGetDB( DB_MASTER );
LoggerFactory::getInstance( 'Math' )->info( 'Store entry for $' . $this->tex .
LoggerFactory::getInstance( 'Math' )->debug( 'Store entry for $' . $this->tex .
'$ in database (hash:' . $this->getMd5() . ')' );
$outArray = $this->dbOutArray();
$method = __METHOD__;

View file

@ -116,7 +116,7 @@ class MathRestbaseInterface {
return true;
} else {
$res = $response['body'];
$this->log()->debug( 'Tex check failed:', array(
$this->log()->info( 'Tex check failed:', array(
'post' => $post,
'error' => $response['error'],
'url' => $request['url']

View file

@ -46,7 +46,7 @@ class MathTexvc extends MathRenderer {
$out['math_html'] = $this->html;
$out['math_mathml'] = utf8_encode( $this->getMathml() );
$out['math_inputhash'] = $this->getInputHash();
LoggerFactory::getInstance( 'Math' )->info( 'Store Hashpath of image' .
LoggerFactory::getInstance( 'Math' )->debug( 'Store Hashpath of image' .
bin2hex( $outmd5_sql ) );
return $out;
}
@ -68,7 +68,7 @@ class MathTexvc extends MathRenderer {
$xhash = unpack( 'H32md5',
$dbr->decodeBlob( $rpage->math_outputhash ) . " " );
$this->hash = $xhash['md5'];
LoggerFactory::getInstance( 'Math' )->info( 'Hashpath of PNG-File:' .
LoggerFactory::getInstance( 'Math' )->debug( 'Hashpath of PNG-File:' .
bin2hex( $this->hash ) );
$this->conservativeness = $rpage->math_html_conservativeness;
$this->html = $rpage->math_html;