Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Log::info next line character not working

I am using the laravel and trying to log the messages.

Log::info('[ProductViewModel/validate] First line message. \r\nSecond line message.');

Why \r\n not working and just show the output like below.

[2016-03-21 10:17:43] local.INFO: [ProductViewModel/validate] First line message. \r\nSecond line message.
like image 750
Frank Myat Thu Avatar asked Dec 08 '22 23:12

Frank Myat Thu


1 Answers

you can use PHP_EOL as line break

Log::info('[ProductViewModel/validate] First line message'. PHP_EOL .'Second line message');
like image 176
Imtiaz Pabel Avatar answered Dec 26 '22 10:12

Imtiaz Pabel