class Log implements ContextualAttribute (View source)

Methods

__construct(UnitEnum|string|null $channel = null, UnitEnum|string|null $name = null)

Create a new class instance.

static LoggerInterface
resolve(Log $attribute, Container $container)

Resolve the log channel.

Details

__construct(UnitEnum|string|null $channel = null, UnitEnum|string|null $name = null)

Create a new class instance.

Parameters

UnitEnum|string|null $channel

The log configuration's channel name.

UnitEnum|string|null $name

The name to prefix all logs with. Only to be used with Monolog drivers.

static LoggerInterface resolve(Log $attribute, Container $container)

Resolve the log channel.

Parameters

Log $attribute
Container $container

Return Value

LoggerInterface

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.