October\Rain\Log\LogManager
Overview
LogManager extends the framework LogManager so the originating channel name is available to MessageLogged listeners.
Laravel's MessageLogged event does not carry the channel name, and the Logger instance itself does not store it. We tag each resolved channel with withContext(['log_channel' => $name]), which merges into the $context array passed to MessageLogged listeners.
Listeners can then read $event->context['log_channel'] to filter by channel.
Extends
- Illuminate\Log\LogManager
Implements
- Psr\Log\LoggerInterface
Protected Properties
protected array
channelTagged tracks which channels have already been tagged, so repeated get() calls do not stack the same context entry.
Show inherited protected properties
Inherited Protected Properties
- $app - The application instance. (defined in Illuminate\Log\LogManager)
- $channels - The array of resolved channels. (defined in Illuminate\Log\LogManager)
- $sharedContext - The context shared across channels and stacks. (defined in Illuminate\Log\LogManager)
- $customCreators - The registered custom driver creators. (defined in Illuminate\Log\LogManager)
- $dateFormat - The standard date format to use when writing logs. (defined in Illuminate\Log\LogManager)
- $levels - The Log levels. (defined in Illuminate\Log\LogManager)
Public Methods
Inherited Public Methods
- __call() - Dynamically call the default driver instance. (defined in Illuminate\Log\LogManager)
- __construct() - Create a new Log manager instance. (defined in Illuminate\Log\LogManager)
- alert() - Action must be taken immediately. (defined in Illuminate\Log\LogManager)
- build() - Build an on-demand log channel. (defined in Illuminate\Log\LogManager)
- channel() - Get a log channel instance. (defined in Illuminate\Log\LogManager)
- critical() - Critical conditions. (defined in Illuminate\Log\LogManager)
- debug() - Detailed debug information. (defined in Illuminate\Log\LogManager)
- driver() - Get a log driver instance. (defined in Illuminate\Log\LogManager)
- emergency() - System is unusable. (defined in Illuminate\Log\LogManager)
- error() - Runtime errors that do not require immediate action but should typically. (defined in Illuminate\Log\LogManager)
- extend() - Register a custom driver creator Closure. (defined in Illuminate\Log\LogManager)
- flushSharedContext() - Flush the shared context. (defined in Illuminate\Log\LogManager)
- forgetChannel() - Unset the given channel instance. (defined in Illuminate\Log\LogManager)
- getChannels() - Get all of the resolved log channels. (defined in Illuminate\Log\LogManager)
- getDefaultDriver() - Get the default log driver name. (defined in Illuminate\Log\LogManager)
- info() - Interesting events. (defined in Illuminate\Log\LogManager)
- log() - Logs with an arbitrary level. (defined in Illuminate\Log\LogManager)
- notice() - Normal but significant events. (defined in Illuminate\Log\LogManager)
- setApplication() - Set the application instance used by the manager. (defined in Illuminate\Log\LogManager)
- setDefaultDriver() - Set the default log driver name. (defined in Illuminate\Log\LogManager)
- shareContext() - Share context across channels and stacks. (defined in Illuminate\Log\LogManager)
- sharedContext() - The context shared across channels and stacks. (defined in Illuminate\Log\LogManager)
- stack() - Create a new, on-demand aggregate logger instance. (defined in Illuminate\Log\LogManager)
- warning() - Exceptional occurrences that are not errors. (defined in Illuminate\Log\LogManager)
- withoutContext() - Flush the log context on all currently resolved channels. (defined in Illuminate\Log\LogManager)
Protected Methods
protected get()
protected get($name, $config = null): void
get resolves a channel and tags it with its name via withContext().
Show inherited protected methods
Inherited Protected Methods
- actionLevel() - Parse the action level from the given configuration. (defined in Illuminate\Log\LogManager)
- bindCallbackToSelf() - Binds the provided callback to the class instance. (defined in Illuminate\Log\LogManager)
- callCustomCreator() - Call a custom driver creator. (defined in Illuminate\Log\LogManager)
- configurationFor() - Get the log connection configuration. (defined in Illuminate\Log\LogManager)
- createCustomDriver() - Create a custom log driver instance. (defined in Illuminate\Log\LogManager)
- createDailyDriver() - Create an instance of the daily file log driver. (defined in Illuminate\Log\LogManager)
- createEmergencyLogger() - Create an emergency log handler to avoid white screens of death. (defined in Illuminate\Log\LogManager)
- createErrorlogDriver() - Create an instance of the "error log" log driver. (defined in Illuminate\Log\LogManager)
- createMonologDriver() - Create an instance of any handler available in Monolog. (defined in Illuminate\Log\LogManager)
- createMonthlyDriver() - Create an instance of the monthly file log driver. (defined in Illuminate\Log\LogManager)
- createRotatingDriver() - Create an instance of a rotating file log driver. (defined in Illuminate\Log\LogManager)
- createSingleDriver() - Create an instance of the single file log driver. (defined in Illuminate\Log\LogManager)
- createSlackDriver() - Create an instance of the Slack log driver. (defined in Illuminate\Log\LogManager)
- createStackDriver() - Create an aggregate log driver instance. (defined in Illuminate\Log\LogManager)
- createSyslogDriver() - Create an instance of the syslog log driver. (defined in Illuminate\Log\LogManager)
- formatter() - Get a Monolog formatter instance. (defined in Illuminate\Log\LogManager)
- getFallbackChannelName() - Get fallback log channel name. (defined in Illuminate\Log\LogManager)
- level() - Parse the string level into a Monolog constant. (defined in Illuminate\Log\LogManager)
- parseChannel() - Extract the log channel from the given configuration. (defined in Illuminate\Log\LogManager)
- parseDriver() - Parse the driver name. (defined in Illuminate\Log\LogManager)
- parseTap() - Parse the given tap class string into a class name and arguments string. (defined in Illuminate\Log\LogManager)
- prepareHandler() - Prepare the handler for usage by Monolog. (defined in Illuminate\Log\LogManager)
- prepareHandlers() - Prepare the handlers for usage by Monolog. (defined in Illuminate\Log\LogManager)
- resolve() - Resolve the given log instance by name. (defined in Illuminate\Log\LogManager)
- tap() - Apply the configured taps for the logger. (defined in Illuminate\Log\LogManager)