Find all files ending with .log in the current directory and its subdirectories, and replace the text "text_to_replace" with "replacement_text" in each of them.
find ~ -name '*.log' -exec sed -i '' 's/text_to_replace/replacement_text/g' {} +