MCPcopy
hub / github.com/adonisjs/core / registerLoggerManager

Method registerLoggerManager

providers/app_provider.ts:130–136  ·  view source on GitHub ↗

* Registers the logger manager to the container * * Creates a singleton binding for 'logger' that instantiates * the LoggerManager with configuration from config/logger.ts * * @example * const loggerManager = await container.make('logger') * const fileLogger = loggerManager.use(

()

Source from the content-addressed store, hash-verified

128 * const fileLogger = loggerManager.use('file')
129 */
130 protected registerLoggerManager() {
131 this.app.container.singleton('logger', async () => {
132 const { LoggerManager } = await import('../modules/logger.js')
133 const config = this.app.config.get<any>('logger')
134 return new LoggerManager<any>(config) as LoggerService
135 })
136 }
137
138 /**
139 * Registers the config to the container

Callers 1

registerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected