A
A
Artem00712018-08-21 11:41:40
Laravel
Artem0071, 2018-08-21 11:41:40

Can I add my own entries to QueryLog?

In Laravel I have included "DB::enableQueryLog();"
So now I can see what is happening with the database in general
. As a result, these records look just like an array:

6 => 
  array (
    'query' => 'select * from `blocks` where `blocks`.`id` in (?)',
    'bindings' => 
    array (
      0 => '8b968393-d7d7-4ea9-aa48-14cd9ff5bc28',
    ),
    'time' => 0.43,
  ),

Is it possible to somehow add your own entries like "something happens here"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2018-08-21
@v_decadence

It is not clear what you want to achieve, but there is a manual addition of a request to this log: Although any request is logged itself. You can, of course, write arbitrary text in the query, but this smacks of perversion. If you just need to log actions, maybe it's better to use ?
Log::info

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question