KLogger
KLogger copied to clipboard
Custom variable
Hi,
I don't understand how to use custom variable?
$logger = new Katzgrau\KLogger\Logger('C:/wamp/www/site/logs', Psr\Log\LogLevel::DEBUG, array(
'extension' => 'log',
'logFormat' => '[{date}] [{level}] [$myCustomVar] {message}'
));
and now where i can use it ?
$logger->info('my log');
Hm, interesting idea, but it's not a supported feature at the moment. You could certainly extend KLogger and override the formatMessage method to achieve that though.
I should add, you would also need to override the info/debug/etc methods
Ok thanks for reply, I will try soon.