Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom variable #74

Open
eloisance opened this issue Nov 21, 2015 · 3 comments
Open

Custom variable #74

eloisance opened this issue Nov 21, 2015 · 3 comments

Comments

@eloisance
Copy link

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');
@katzgrau
Copy link
Owner

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.

@katzgrau
Copy link
Owner

I should add, you would also need to override the info/debug/etc methods

@eloisance
Copy link
Author

Ok thanks for reply, I will try soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants