// Configure logs/custom.log to receive all levels, but only
// those with `custom` scope.
Log::config('custom', [
'className' => 'File',
'path' => LOGS,
'levels' => [],
'scopes' => ['custom'],
'file' => 'custom.log',
]);
Log::debug('this gets written only to custom.log', ['scope' => ['custom']]);