vlauciani's avatar

Log file: "indent" or insert "newline"

Hi all

Do you know how I can "indent" the message or write a "newline" into the log file? For example I have this variable:

$sql = "SELECT *
               FROM myTable
               WHERE id=10;"

when I run:

Log::info("my query:".$sql)

it writes in the lumen.log file:

[2016-01-29 08:39:31 - ] lumen.INFO: sql:SELECT *                  FROM myTable                   WHERE id=10;

but I would like something like:

[2016-01-29 08:39:31 - ] lumen.INFO: sql:
SELECT *                  
FROM myTable                   
WHERE id=10;

I tried to insert \n like this:

Log::info("my query: \n ".$sql)

but It doesn't work.

Thank you.

0 likes
0 replies

Please or to participate in this conversation.