private function writeMessage(string $level, string $message, string $tag, string $file, int $line, array $target_loggers)
    {
        if ( !$this->logger_config->isLogEnabled() ){
            return;
        }

        // determine log level filter
        $log_level_filter = 'E';
        foreach($this->logger_config->getLogLevelFilters() as $path => $lv)
        {
            if ($this->route_context === $path || strpos($this->route_context, $path) === 0){
                $log_level_filter = $lv;
            }
        }

        // do not output message when log level does not meet the filter level
        $cmp = self::compareLogLevel($level, $log_level_filter);
        if ( $cmp > 0 ){
            return;
        }

        // ignore different tags
        $log_tag_filters = $this->logger_config->getTagFilters();
        if ( is_array($log_tag_filters) && !empty($log_tag_filters) ){
            if ( !in_array( $tag, $log_tag_filters ) ){
                return;
            }
        }
    
        $msg = new LogMessage($level, $message, $tag, $file, $line);
    
        foreach( $target_loggers as $key )
        {
            if ( isset($this->loggers[$key]) && in_array($key,$target_loggers) )
            {
                $this->loggers[$key]->writeln($msg);
            }
        }
    }