Topic on Manual talk:Structured logging

Doesn't work in extensions??

3
Summary by Legoktm

Missing use statement

Subfader (talkcontribs)
$mylog = LoggerFactory::getInstance( "mylog" );
$mylog->debug( "Foo bar" );

>>

Fatal error: Class 'LoggerFactory' not found in .../extensions/CharInsert/CharInsert.body.php on line 15
Legoktm (talkcontribs)

Do you have a use MediaWiki\Logger\LoggerFactory; at the top of the file?

Subfader (talkcontribs)

Thanks, that fixed it.