itelmenko / laravel-mysql-logger

Laravel 5.6+ MySQL driver for Monolog
19 stars 8 forks source link

How to pass create_by and remote_addr parameter? #2

Closed rockers007 closed 5 years ago

rockers007 commented 6 years ago

How to pass create_by and remote_addr parameter?

itelmenko commented 6 years ago

Hi @rockers007 ! I think remote_addr and another is contextual information. Like id in documentation .

Log::info('User failed to login.', ['id' => $user->id]);

Did you try it?

rockers007 commented 6 years ago

@itelmenko Thanks ,but its not working,I already tried for this

itelmenko commented 6 years ago

@rockers007

Log::info('Something happened!', ['remote_addr' => '127.0.0.2']);

It works for me. Tried in artisan tinker. In database I see this parameter in context field