private EnvironmentLogger buildParentTree ( String childName ) { if ( childName == null || childName . equals ( "" ) ) return null ; int p = childName . lastIndexOf ( ' ' ) ; String parentName ; if ( p > 0 ) parentName = childName . substring ( 0 , p ) ; else parentName = "" ; EnvironmentLogger parent = null ; SoftReference < EnvironmentLogger > parentRef = _envLoggers . get ( parentName ) ; if ( parentRef != null ) parent = parentRef . get ( ) ; if ( parent != null ) return parent ; else { parent = new EnvironmentLogger ( parentName , null ) ; _envLoggers . put ( parentName , new SoftReference < EnvironmentLogger > ( parent ) ) ; EnvironmentLogger grandparent = buildParentTree ( parentName ) ; if ( grandparent != null ) parent . setParent ( grandparent ) ; return parent ; } }
Recursively builds the parents of the logger .