Find all files with the extension ".log" in the "/var/log/" directory and search for the strings "localhost" or "127.0.0.1" (case insensitive) in them.
find /var/log/ -name "*.log" | xargs grep -i -E 'localhost|127\.0\.0\.1'