If so how can it be done? By default Laravel 4 writes to a text file. I notice that Monolog can Log to Database on its github page. I have tried with this. But rather than storing in database its better to store error log on socket. So can you suggest me according to the socket logging.
Asked
Active
Viewed 486 times
1 Answers
0
According to Laravel doc and Monolog socket example:
// get Monolog instance
$logger = Log::getMonolog();
// create the socket handler
$handler = new Monolog\Handler\SocketHandler('unix:///var/log/httpd_app_log.socket');
$handler->setPersistent(true);
// now add the handler
$logger->pushHandler($handler, Monolog\Logger::DEBUG);
After register socket handler, you can use Laravel log methods.

aykut
- 2,984
- 24
- 26