public static void logMesosConfig ( Logger log , MesosConfiguration config ) { Map < String , String > env = System . getenv ( ) ; Protos . FrameworkInfo . Builder info = config . frameworkInfo ( ) ; log . info ( "--------------------------------------------------------------------------------" ) ; log . info ( " Mesos Info:" ) ; log . info ( " Master URL: {}" , config . masterUrl ( ) ) ; log . info ( " Framework Info:" ) ; log . info ( " ID: {}" , info . hasId ( ) ? info . getId ( ) . getValue ( ) : "(none)" ) ; log . info ( " Name: {}" , info . hasName ( ) ? info . getName ( ) : "(none)" ) ; log . info ( " Failover Timeout (secs): {}" , info . getFailoverTimeout ( ) ) ; log . info ( " Role: {}" , info . hasRole ( ) ? info . getRole ( ) : "(none)" ) ; log . info ( " Capabilities: {}" , info . getCapabilitiesList ( ) . size ( ) > 0 ? info . getCapabilitiesList ( ) : "(none)" ) ; log . info ( " Principal: {}" , info . hasPrincipal ( ) ? info . getPrincipal ( ) : "(none)" ) ; log . info ( " Host: {}" , info . hasHostname ( ) ? info . getHostname ( ) : "(none)" ) ; if ( env . containsKey ( "LIBPROCESS_IP" ) ) { log . info ( " LIBPROCESS_IP: {}" , env . get ( "LIBPROCESS_IP" ) ) ; } if ( env . containsKey ( "LIBPROCESS_PORT" ) ) { log . info ( " LIBPROCESS_PORT: {}" , env . get ( "LIBPROCESS_PORT" ) ) ; } log . info ( " Web UI: {}" , info . hasWebuiUrl ( ) ? info . getWebuiUrl ( ) : "(none)" ) ; log . info ( "--------------------------------------------------------------------------------" ) ; }
A utility method to log relevant Mesos connection info .