I am getting 2014-06-23 02:23:14] log.INFO: General information log [] []
in my log.txt
while calling $monolog->info('General information log');
I don't understand the need of [] []
hence I want to get rid of these square brackets from logged message. But I don't have any idea how...!
Asked
Active
Viewed 715 times
1

PHP Ferrari
- 15,754
- 27
- 83
- 149
1 Answers
0
Well I did this via code hack
1st:
E:\xampp\htdocs\my_site\vendor\monolog\monolog\src\Monolog\Formatter\LineFormatter.php
2nd: Find this line
const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n";
3rd: and replace
const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% \n";
[2014-06-23 13:23:33] production.INFO: yada ya da error
This is my log file
It will remove the square brackets I have tested.

PHP Ferrari
- 15,754
- 27
- 83
- 149