As indicated in the comments, the location and log file name are hard-coded.
Now, if for some good reason you want to change it, you can always extend the Laravel\Lumen\Application class and override the getMonologHandler() method.
Create a new Application.php file in the app folder that looks like
namespace App; use Laravel\Lumen\Application as LumenApplication; use Monolog\Formatter\LineFormatter; use Monolog\Handler\StreamHandler; use Monolog\Logger; class Application extends LumenApplication { protected function getMonologHandler() { return (new StreamHandler(storage_path(env('APP_LOG_PATH', 'logs/xyz.log')), Logger::DEBUG)) ->setFormatter(new LineFormatter(null, null, true, true)); } }
Now change
$app = new Laravel\Lumen\Application(
to
$app = new App\Application(
in bootstrap\app.php file
Now the file of your Voila file is called xyz.log . Moreover, you can change it to whatever you want by specifying the environment variable APP_LOG_PATH ie via .env file
APP_LOG_PATH=logs/abc.log
source share