static void logResult ( Map < String , Object > result , DumpConfig config ) { Consumer < String > loggerFunc = getLoggerFuncBasedOnLevel ( config . getLogLevel ( ) ) ; if ( config . isUseJson ( ) ) { logResultUsingJson ( result , loggerFunc ) ; } else { int startLevel = - 1 ; StringBuilder sb = new StringBuilder ( "Http request/response information:" ) ; _logResult ( result , startLevel , config . getIndentSize ( ) , sb ) ; loggerFunc . accept ( sb . toString ( ) ) ; } }
A help method to log result pojo