sijie commented on a change in pull request #1160: Dump config
URL: https://github.com/apache/bookkeeper/pull/1160#discussion_r168907007
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 ##########
 @@ -618,4 +618,22 @@ public String getTLSEnabledProtocols() {
      * Trickery to allow inheritance with fluent style.
      */
     protected abstract T getThis();
+
+    /**
+     * converts the config into string format, by appending the config values
+     * and separated by 'separator'.
+     *
+     * @param separator
+     *            separator to separate the configs in string
+     */
+    public String configAsString(String separator) {
 
 Review comment:
   this is what I am referring to : 
https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ConfigurationService.java#L52
   
   I was thinking of adding `String asJson()` in `AbstractConfiguration`. so it 
can be used in 1) configuration service and 2) logging purpose as here. that is 
what I was talking about consolidating the logic on how we dump the 
configuration. so we don't need to have multiple logic on dumping 
configuration. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to