diff --git a/logging.md b/logging.md index b269359a124..87dfd205cfa 100644 --- a/logging.md +++ b/logging.md @@ -227,9 +227,14 @@ Sometimes you may wish to log a message to a channel other than your application Log::channel('slack')->info('Something happened!'); -It is also possible to create an on-demand channel by providing the configuration at runtime without that configuration being - present in your application's `logging` configuration file. To accomplish this, you may pass a configuration array to the - the `Log` facade's `build` method: +If you would like to create an on-demand logging stack consisting of multiple channels, you may use the `stack` method: + + Log::stack(['single', 'slack'])->info('Something happened!'); + + +#### On-Demand Channels + +It is also possible to create an on-demand channel by providing the configuration at runtime without that configuration being present in your application's `logging` configuration file. To accomplish this, you may pass a configuration array to the the `Log` facade's `build` method: use Illuminate\Support\Facades\Log; @@ -238,12 +243,7 @@ It is also possible to create an on-demand channel by providing the configuratio 'path' => storage_path('logs/custom.log'), ])->info('Something happened!'); -If you would like to create an on-demand logging stack consisting of multiple channels, you may use the `stack` method: - - Log::stack(['single', 'slack'])->info('Something happened!'); - -You may also wish to include an on-demand channel in an on-demand logging stack. This can be achieved by including your - on-demand channel instance in the array passed to the `stack` method: +You may also wish to include an on-demand channel in an on-demand logging stack. This can be achieved by including your on-demand channel instance in the array passed to the `stack` method: use Illuminate\Support\Facades\Log; @@ -254,7 +254,6 @@ You may also wish to include an on-demand channel in an on-demand logging stack. Log::stack(['slack', $channel])->info('Something happened!'); - ## Monolog Channel Customization