* 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(
()
| 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 |