I would like to use the recently accessed directories list for logging purposes.
Is the directory stack as used by
popd stored somewhere, perhaps as a list of folders in a text file? If so, where?
is the shell builtin you're looking for, see the man page for bash's implementation:
Display the list of currently remembered directories.
dirs [+N | -N] [-clpv]