master

laravel/framework

Last updated at: 29/12/2023 09:23

LogServiceProvider.php

TLDR

This file is a service provider for the Log component in the Illuminate package. It registers the log service and creates an instance of the LogManager.

Methods

register

This method is responsible for registering the log service. It creates a singleton instance of the LogManager and binds it to the application container.

Classes

LogServiceProvider

This class is a service provider for the Log component in the Illuminate package. It extends the ServiceProvider class and provides the necessary functionality to register the log service.

<?php

namespace Illuminate\Log;

use Illuminate\Support\ServiceProvider;

class LogServiceProvider extends ServiceProvider
{
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('log', fn ($app) => new LogManager($app));
    }
}