Laravel 5 log data to another file

Here is example:

Log::useFiles(base_path() . '/path/to/custom/file.log', 'info');
Log::info('Do log this another PATH');

Another way

date_default_timezone_set('Asia/Dhaka');
$data = date('Y-m-d');
$time = date('h-A');
Log::useFiles(base_path() . '/log/'.$data.'/'.$time.'-'info.log', 'info');
Log::info('Do log this another PATH');

on this example every date create a folder with saperate log with hourly.

Regarding Laravel 5:

You can also change single log path & name.

Add below line of code to : bootstrap>>app.php very bottom above of return $app;


    # SINGLE LOG
    $app->configureMonologUsing(function($monolog) use ($app) {
        $handler = new Monolog\Handler\StreamHandler($app->storagePath().'/logs/YOUR_SINGLE_LOG_NAME.log');
        $handler->setFormatter(new \Monolog\Formatter\LineFormatter(null, null, true, true));
        $monolog->pushHandler($handler);
    });