wwbmmm commented on PR #1854:
URL: https://github.com/apache/incubator-brpc/pull/1854#issuecomment-1193481790

   百度内部是通过gflag来自定义server prefix的,代码大致如下:
   
   ```cpp
   std::string Server::ServerPrefix() const {
       if (FLAGS_customized_server_prefix.empty()) {
            return base::string_printf("%s_%d", g_server_info_prefix, 
listen_address().port);
       } else {
           return FLAGS_customized_server_prefix;
       }
   }
   ```
   
   可以看下哪种方式更方便一些。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to