Level 58
You can create a custom log channel in Laravel and then configure the Laravel FFmpeg package to use that channel for logging. Here are the steps:
- Create a new log channel in your
config/logging.phpfile. For example, you can add the following code to create a new channel calledffmpeg:
'channels' => [
// ...
'ffmpeg' => [
'driver' => 'single',
'path' => storage_path('logs/ffmpeg.log'),
'level' => 'debug',
],
],
- Update your
config/laravel-ffmpeg.phpfile to use the newffmpegchannel for logging. Set thelog_channeloption toffmpeg, like this:
'enable_logging' => true,
'log_channel' => 'ffmpeg',
- That's it! Now, when you use the Laravel FFmpeg package, it will log all output to the
ffmpeg.logfile in yourstorage/logsdirectory.
Note: Make sure that the storage/logs directory is writable by your web server.