logger = new Logger($channelName); $this->options = $options; $stream = new StreamHandler( $this->options['log']['path'] ?? GlobalOptions::get('log.path') ?? Runtime::LOG_PATH, $this->options['log']['level'] ?? GlobalOptions::get('log.level') ?? Runtime::LOG_LEVEL ); $stream->setFormatter( new LineFormatter( null, null, true, true ) ); $this->logger->pushHandler($stream); } public function getLogLevel(): int { return $this->options['log']['level'] ?? GlobalOptions::get('log.level') ?? Runtime::LOG_LEVEL; } public function getLogger(): Logger { return $this->logger; } }