Remember each ref's (relative) name

This is redundant because the ref is in a map by name, but we
want the info here for diagnostic purposes.
BUGFIX: path_set should not always appear to be empty!
Expose log level so we can skip over formatting entirely if we so wish.
Add trace logging so we can see something happening