Renaming a pile of files with a pattern is easy to get wrong, and mv has no undo. zsh has a helper that shows the plan first.
zmv ships with zsh but has to be loaded once. Then give it a pattern with a group in parentheses and a new name that uses $1:
autoload -U zmv
zmv -n '(*).log' '$1.txt'
The -n flag means no execution: it prints what would happen, for example mv -- one.log one.txt, and changes nothing. Happy with the list? Run the same command without -n, or with -v to see each rename as it happens.
A caveat: this is a zsh function, so it doesn’t exist in bash. Quote both patterns, otherwise the shell expands the glob before zmv sees it.
Further reading: zsh manual: zmv (zshcontrib)