[web] consolidate logTree helper into scripts folder GitOrigin-RevId: d98a04f1753ba485f835312198f4c79917f7566d